Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Your INCLUDE statement should be:
Code:
INCLUDE COND=(1,2,CH,EQ,C'T2')
so the length of the field (2) matches the length of the constant.
It's not clear what you want to do.
Do you want only one record in the output file (the first record that has 'T4' in positions 1-2)? If so, you can use:
Code:
OPTION STOPAFT=1
to only get that record in the output file. (Of course, if that's the case, then I have to wonder why you're doing a sort for only one record rather than a copy).
Or do you want the output file to have only one record with 'T4' in 1-2, and all of the other records that don't have 'T4' in 1-2?
Please clarify what you want. An example of input and output would help. Also what is the RECFM and LRECL of the input file?