Parsing 80 fields for EDI output
Hello to everyone. I am trying to parse out a 80 field record. There are only 8 repeating fields with 22 repetitions each. My problem is that I do not know how to go about parsing the repeating fields. I know how to obtaint the information from any place within the repeating field, but I do not know how to go about placing it out on the layout. Each repeating info within the field is set on a parsing line and accompained by two more lines for each ocurrence. Here's a sample of the first three repetitions:
As you can notice, LX*1~, SV*, and DTP* form the first cluster. DTP line is taken from a field different to the SV* repating field but always goes below each Lx*~ SV* ocurrence.
I thought of parsing the entire record on one text field, but I I am not sure if that will work since the output will be in one line and it needs to be separated into many parsed lines.
The wya I am parsing now , I created a new table with as many text records as the parsing document has. Then through a script I am parsing the information and setting it in each corresponding field. Every thing works fine until I reach the 22 repeating fields for the SV* line; since I have only one text field to parse to, I do not know how to go about when I have more than one line of information so it shows similar to the image I apsted above.
any guidance will be truly appreciated. I hope I'm not getting into a mess.