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.
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?
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 .