Loading ...
Sorry, an error occurred while loading the content.
 

2/28/01 - Data Manipulation Problem

Expand Messages
  • Gorden-Ozgul, Patricia E
    Hi List, I need help. The datafile I have contains tagged data items. Each record MUST contain identical tagged data items (In name and number). In fact,
    Message 1 of 1 , Feb 28, 2001
      Hi List,

      I need help.

      The datafile I have contains tagged data items.
      Each record MUST contain identical tagged data items (In name and number).
      In fact, probability is great that each record will be missing one or more
      tagged data items.
      Each record should contain exactly fifty(50) tags which I can identify.
      If there is a tag missing from a record, it should be added with a NULL
      string value.

      I'm sure that there is grep/sed/awk/perl solution out there for my problem.
      Are you willing to provide me with a possible solution?

      Sample data:

      <REC>
      <COPY>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = AVLIB>"string"</#FIELD>
      <#FIELD NAME = CATNO>"string"</#FIELD>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = CHOUT>"string"</#FIELD>
      <#FIELD NAME = COPY>"string"</#FIELD>
      ...(more fields possible)
      </COPY>
      </REC>
      <REC>
      <COPY>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = AVLIB>"string"</#FIELD>
      <#FIELD NAME = CATNO>"string"</#FIELD>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = CHOUT>"string"</#FIELD>
      <#FIELD NAME = COPY>"string"</#FIELD>
      ...(more fields possible)
      </COPY>
      </REC>
      <REC>
      <COPY>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = AVLIB>"string"</#FIELD>
      <#FIELD NAME = CATNO>"string"</#FIELD>
      <#FIELD NAME = ADD_DT>"string"</#FIELD>
      <#FIELD NAME = CHOUT>"string"</#FIELD>
      <#FIELD NAME = COPY>"string"</#FIELD>


      I sincerely appreciate any help. Even a lead-in would brighten my day!
      Pat

      __________________________________________________
      Pat Gorden-Ozgul BNL-ISD Systems
      gorden@... 631-344-5159







      __________________________________________________
      Pat Gorden-Ozgul BNL-ISD Systems
      gorden@... 631-344-5159
    Your message has been successfully submitted and would be delivered to recipients shortly.