Hi Experts,
I am trying to write a sort card to copy records based on values.
For example, I have to copy records between A1 through AZ. A1 to AZ can be n times in the input file and I have to copy all those inbetween records along with those records.
Input: A1
Record 1
Record 2
...........
...........
Record 10
AZ
B1
Record 11
Record 12
..........
Record 25
BZ
A1
Record 26
Record 27
AZ
Record 28
Output: A1
Record 1
Record 2
...........
...........
Record 10
AZ A1
Record 26
Record 27
AZ
Just impossible to understand anything from this complete mess of words...
0) Learn how to use the Code button when presenting your code, and/or data
1) Please give the clear examples of your input data and (mandatory!!!) your desired output data. For instance: what is the role of your B1-BZ records? What else except A1/B1/AZ/BZ you need to consider in your input data? Etc, etc, etc...
2) Please demonstrate what did you try to do by yourself, so far?
Hi Sergeyken,
I have used the grouping with BEGIN and END. But outrec is writing all the records of Input file.
For example, I need only the bolded records to my output file and I don't want the remaining records .