Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in


Need help with Syncsort

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

Active User

Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Fri Oct 09, 2009 3:45 pm    Post subject: Need help with Syncsort
Reply with quote


I have an input file with LRECL=30,RECFM=FB with the below layout:

state pic x(02)
card# pic x(20)
date pic x(08)

there are six state i.e. 01, 02, 03, 04, 05 and 06. Now i need to covert all the card# in state 05 and 06 to 01 and also should make sure that there are no duplicate (state and card# combination). I did write a sort card as shown below:


//JS0001   EXEC PGM=SORT                           
//SYSPRINT DD  SYSOUT=*                             
//SYSOUT   DD  SYSOUT=*                             
//             DSN=xxx.VSAM.D101.TEST.TEMP,         
//             UNIT=3390,DATACLAS=EXTMED,           
//*            SPACE=(CYL,(5,5),RLSE),             
//             LRECL=031,RECFM=FB                   
//SYSIN    DD  *                                   
  INREC OVERLAY=(31:C'1')                           
  SORT FIELDS=(1,2,BI,A,3,20,BI,A,23,8,BI,A)       
  OUTREC IFTHEN=(WHEN=(1,2,CH,EQ,C'04'),           
//JS0002   EXEC PGM=SORT                                               
//SYSOUT   DD  SYSOUT=*                                               
//SYSPRINT DD  SYSOUT=*                                               
//SORTIN   DD  DISP=SHR,DSN=xxx.VSAM.D101.TEST.TEMP                   
//SORTOUT  DD  DISP=(,CATLG,DELETE),                                   
//             DATACLAS=EXTLRG,                                       
//             DCB=(LRECL=80,RECFM=FB),                               
//             DSN=xxx.VSAM.D101.TEST.TEMP2                           
//SYSIN    DD  *                                                       
  SORT FIELDS=(1,2,BI,A,3,20,BI,A,31,1,BI,A)                           
//STEP0060 EXEC PGM=SORT                                   
//SYSOUT   DD  SYSOUT=*                                   
//SYSPRINT DD  SYSOUT=*                                   
//SORTOUT  DD  DISP=(,CATLG,DELETE),                       
//             DATACLAS=EXTLRG,                           
//             DCB=(LRECL=30,RECFM=FB),                   
//             DSN=xxx.D101.TEST                     
//SORTXSUM DD  SYSOUT=*                                   
//SYSIN    DD  *                                           
  SORT FIELDS=(1,2,BI,A,3,20,BI,A)                         
  SUM FIELDS=NONE,XSUM                                     
  OUTREC BUILD=(1:1,30)                                   

This is working for me. But i need to confirm how many card for banner 04 and 05 were changed 01 in first step. can anyone help with this.

PS: all the files in the job are flat files and the last file i need to copy/repro into a VSAM file.

Back to top
View user's profile Send private message


Senior Member

Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Oct 12, 2009 3:35 am    Post subject:
Reply with quote


why not compare the 2 files ?

or obtain a count before and after the update.

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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts Regd Date Functions in Syncsort muralikrishnan_new SYNCSORT 2 Fri Jul 01, 2016 8:21 pm

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