View previous topic :: View next topic
|
Author |
Message |
john gresam
New User
Joined: 04 Jul 2013 Posts: 2 Location: India
|
|
|
|
Hi All,
I have a request to drop records from my input file which has 24 months data and i need to drop the records of 24th month data from my input file and it looks like as below:
Input file:
ccyymm
201109................
201110................
201111................
201112................
......
......
201309................
201310................
from above data i need to drop records with value '201109'. If it is for one time request i can just use the omit in sort and eliminate those records, but my job runs every month so next month when my job runs it should remove '201110' value records and so on......
Please anyone suggest the sort condition for this using syncsort |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Try this job:
Code: |
//STEP01 EXEC PGM=SORT
//SORTIN DD *
201109
201110
201111
201112
201309
201310
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL OMIT=(1,6,CH,LT,DATE2-24),BUILD=(1,6)
/* |
Output:
Code: |
201110
201111
201112
201309
201310 |
|
|
Back to top |
|
|
john gresam
New User
Joined: 04 Jul 2013 Posts: 2 Location: India
|
|
|
|
Thanks mistah kurtz . It worked. |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
You're welcome :-) |
|
Back to top |
|
|
|