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: 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 BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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