IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCSORT to retrieve last month's details.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
eytellene

New User


Joined: 19 May 2009
Posts: 16
Location: Philippines

PostPosted: Tue May 26, 2009 2:00 pm
Reply with quote

Hi Masters,

I just would like to ask if is it possible in JCL to retrieve to sort records to retrieve last month's details?

example

File 1 has the following details
FB, length - 80
date starts at positin 21 (10 bytes) in mm/dd/yyyy format
xxxxxxxxxxxxxxxxxxxx02/10/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx03/02/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx04/04/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx04/06/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx04/08/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx05/01/2009xxxxxxxxxxx...

Output File must be

xxxxxxxxxxxxxxxxxxxx04/04/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx04/06/2009xxxxxxxxxxx....
xxxxxxxxxxxxxxxxxxxx04/08/2009xxxxxxxxxxx....

will this JCL work?

Code:

//PS020    EXEC PGM=SYNCSORT                               
//SYSOUT   DD  SYSOUT=*                                   
//SORTIN   DD  DSN= input file,
//         DISP=SHR                                   
//SORTOUT  DD  DSN=output file
//         DISP=(,CATLG,DELETE),
//         RECFM=FBA,                                   
//         DATACLAS=STANDARD   
//*
//SYSIN    DD *     
  SORT FIELDS=COPY
  OUTFIL FILES=OUT, 
  INREC OVERLAY=(81:&DATE2)                       
     INCLUDE=(11,02,CH,EQ,86,02,CH,AND,
            17,04,CH,EQ,81,04,CH)
  TRAILER1=(01:'MTD ALL   ',     
            11:COUNT15),
  NODETAIL
/*
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue May 26, 2009 2:33 pm
Reply with quote

Quote:
will this JCL work?
What happened when u ran this job?
Back to top
View user's profile Send private message
eytellene

New User


Joined: 19 May 2009
Posts: 16
Location: Philippines

PostPosted: Tue May 26, 2009 2:54 pm
Reply with quote

actually that is my problem since I donot have an ID yet and they just want me to design so I am just basing the JCL on the forums and I just want to know if this syntax is correct....or is possible... icon_cry.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue May 26, 2009 6:26 pm
Reply with quote

Quote:
actually that is my problem since I donot have an ID yet and they just want me to design so I am just basing the JCL on the forums
Hello,

You must not be doing the "design" of your requirement based on what you see in a forum. The above code has some syntax errors. Refer your SyncSort manual and learn the correct syntax. If you dont have one, you can contact Alissa Margulies(JCL Moderator) or send an email to zos_tech@syncsort.com
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top