Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
That's the correct INCLUDE statement for what you described. So I can only guess that your S9(9) comp-3 field does NOT actually start in position 1. Does your input file have RECFM=VB? If so, then the field starts in position 5 after the RDW so the INCLUDE statement should be:
Code:
INCLUDE COND=(5,5,PD,GE,20080101)
If that's not it, then tell me the RECFM and LRECL of your input file and show me an example of the values in positions 1-5 of your input records.
Quote:
I think I need to conver the PD to ZD but not sure how.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
archana_ssy wrote:
Thanks Frank.
Below are further details -
LRECL=2007,RECFM=VB
Date Filed # 1 starts @904 position
Date field # 2 starts @912
Did you consider the RDW when calculated the position 904? If not you need to add 4 bytes to the actual position as the actual data in a VB file starts at position 5. The first 4 bytes will be the RDW
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
If 904 and 912 are the data positions, then you need to add 4 to each to account for the RDW in positions 1-4.
Code:
SORT FIELDS=COPY
INCLUDE COND=((912,5,PD,GE,20080101),OR,
((916,5,PD,GE,20080101),AND,
(916,5,PD,NE,99999999)))
However, what you are showing in your example are ZD values, not PD values. You'd have to show the values in hex for us to verify that they are actually PD values.