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: 287
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: 287
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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm


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