View previous topic :: View next topic
|
Author |
Message |
karthick anandaraman
New User
Joined: 05 Jan 2010 Posts: 6 Location: chennai
|
|
|
|
I have a file in which sales done for the whole year is present. The sales date is there in the fomat (DDMMYY).
Now I want to create a output file, which has the sales date only after 010909. Can you please suggest me a easy way to do this .
EXAMPLE I/P file :
xxxxxxxxxx yyyyyyyy 010109 zzzzzz...
xxxxxxxxxx yyyyyyyy 010209 zzzzzz...
xxxxxxxxxx yyyyyyyy 010909 zzzzzz...
xxxxxxxxxx yyyyyyyy 011009 zzzzzz...
REquired O/P file :
xxxxxxxxxx yyyyyyyy 010909 zzzzzz...
xxxxxxxxxx yyyyyyyy 011009 zzzzzz... |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use a DFSORT job like the following to what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
xxxxxxxxxx yyyyyyyy 010109 zzzzzz...
xxxxxxxxxx yyyyyyyy 010209 zzzzzz...
xxxxxxxxxx yyyyyyyy 010909 zzzzzz...
xxxxxxxxxx yyyyyyyy 011009 zzzzzz...
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(81:25,2,23,2,21,2)
OUTFIL INCLUDE=(81,6,CH,GE,C'090901'),BUILD=(1,80)
/*
|
|
|
Back to top |
|
|
lee_issc
New User
Joined: 11 Dec 2008 Posts: 33 Location: China
|
|
|
|
What will the record length of output file be? |
|
Back to top |
|
|
karthick anandaraman
New User
Joined: 05 Jan 2010 Posts: 6 Location: chennai
|
|
|
|
it will be same as that of the input file.. I just want to filter the records. |
|
Back to top |
|
|
karthick anandaraman
New User
Joined: 05 Jan 2010 Posts: 6 Location: chennai
|
|
|
|
Thank you Frank.. your JCL worked wonderful for me.. |
|
Back to top |
|
|
|