Beyond that, you also have syntax errors in the INCLUDE statement. The correct syntax would be:
Code:
INCLUDE COND=(53,1,SS,EQ,C'A,B,C,D',AND,
43,8,CH,LT,C'20070101',AND,
43,8,CH,GT,C'20051231')
However, it's not clear if that syntax will give you what you want since you haven't described what you want.
Please show an example of the records in your input file (relevant fields only) and the expected output records, and explain the "rules" for getting from input to output.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Does the control statement differs for SORT than ICETOOL?
No.
You're right that the format is missing and results in an error msg (I missed this somehow when I tested the syntax). For the original syntax, CH format should be used to match the character constant. I've fixed my original post. Thanks for pointing this out.
You're using ZD format and a decimal constant which will work too.
I need to select records who are type A or B or C or D from a file, also the records should be originated between the dates 01/01/2007 and 31/12/2005 . . .
like
record orig.date type
------- ----------- ------
1 15/6/2006 A
2 12/7/2006 Z
3 13/8/2006 B
murali i believe that one of the record type is Z . . . hence it isn't supposed to be selected . . .also the date format on the files is yyyymmdd . . . i wrote the dates that way for simple understanding . . .