Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 271
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: 271
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
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us