Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Yes, but how you would do it depends on the actual format of the date fields. In the simple case of C'yyyymmdd' dates and in some other cases, you could these DFSORT control statements:
Code:
OPTION COPY
INCLUDE COND=(datefield1,LT,datefield2)
But for a date like C'mmddyyyy' some more data manipulation would be required to get the date as C'yyyymmdd'.
If you need more help with this, tell me the format of the date fields (show some examples) and the starting position of each date field.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
When I run DFSORT using that INCLUDE statement with a record containing '610' in 22-24 and the date values you show (assuming the first one starts at 25, the second starts at 55, etc), that record is NOT included as I wouldn't expect it to be.
So if you got that record, something is not as you said it is. Given that you can't decide if your fields are CH or PD, I would suggest that you don't have the correct starting position, length or format for one or more of your fields.
Quote:
So tried giving PD in the place of CH and length 5 instead of 8, but got no results.