Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need a Sort condition to omit records based on input date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
john gresam

New User


Joined: 04 Jul 2013
Posts: 2
Location: India

PostPosted: Thu Oct 24, 2013 6:12 pm    Post subject: Need a Sort condition to omit records based on input date
Reply with quote

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
View user's profile Send private message

mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Thu Oct 24, 2013 6:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
john gresam

New User


Joined: 04 Jul 2013
Posts: 2
Location: India

PostPosted: Thu Oct 24, 2013 10:18 pm    Post subject: Reply to: Need a Sort condition to omit records based on inp
Reply with quote

Thanks mistah kurtz . It worked. icon_smile.gif
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Fri Oct 25, 2013 11:15 am    Post subject:
Reply with quote

You're welcome :-)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts Process Last Key of a record based on... naveen katkuri DFSORT/ICETOOL 5 Mon Nov 12, 2018 9:54 am
No new posts Writing multiple records into a CSV r... hiravibk DFSORT/ICETOOL 2 Wed Nov 07, 2018 2:35 pm
No new posts Can records in IMS/DB be related usin... SRICOBSAS IMS DB/DC 2 Fri Oct 19, 2018 3:53 pm
No new posts Need help on the multiple files refor... wik123 DFSORT/ICETOOL 7 Wed Sep 19, 2018 10:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us