Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Assuming your date in FILE-A is really mmddyyyy in positions 32-39 as stated in your other post, here's a DFSORT job that will do what you asked for. If your date is really something else or somewhere else, adjust accordingly, or give me the details and I'll show you how to change the job.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/422)
//OUT1 DD DSN=... output file1 (FB/422)
//OUT2 DD DSN=... output file2 (FB/422)
//SYSIN DD *
INREC OVERLAY=(423:36,4,32,4)
OPTION COPY
OUTFIL FNAMES=OUT1,INCLUDE=((58,1,CH,EQ,C'5',AND,
121,2,CH,NE,C'42',AND,121,2,CH,NE,C'45',AND,
423,8,CH,GT,C'20101014'),OR,
(58,1,CH,EQ,C'S',AND,
423,8,CH,GT,C'20101014')),BUILD=(1,422)
OUTFIL FNAMES=OUT2,SAVE
/*
|
|
|