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
 

 

JCL to compare 2 files using SYNCSORT

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

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Thu Jan 10, 2008 8:22 pm    Post subject: JCL to compare 2 files using SYNCSORT
Reply with quote

I need a SYNCSORT job which compares first 34 characters from two input files and creates a ouput file which contains no matches in file 1.

LRECL OF FRST FILE:195
LRECL OF SECOND FILE:195
LRECL OF OUTPUT FILE:195
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jan 10, 2008 10:45 pm    Post subject:
Reply with quote

Code:
//*********************************
//SORT1    EXEC PGM=SYNCSORT       
//SORTJNF1 DD DSN=FILE-1           
//SORTJNF2 DD DSN=FILE-2           
//SYSOUT   DD SYSOUT=*             
//SORTOUT DD DSN=O/P FILE         
//SYSIN    DD *                   
 JOINKEYS FILE=F1,FIELDS=(1,34,A) 
 JOINKEYS FILE=F2,FIELDS=(1,34,A) 
 JOIN UNPAIRED,F1,ONLY             
 REFORMAT FIELDS=(F1:1,195)       
 SORT FIELDS=COPY                 
//*                               
Back to top
View user's profile Send private message
rohit510

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Fri Jan 11, 2008 11:56 am    Post subject:
Reply with quote

Thanks for the reply kRISPREMs
but its not working for me.Its abending with U00016.
Warning being generated is SORTOUT not defined.
can you please help me in solving this kRISPREMs
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Fri Jan 11, 2008 12:29 pm    Post subject:
Reply with quote

Quote:
but its not working for me
Which version of Syncsort you are running?
Back to top
View user's profile Send private message
rohit510

New User


Joined: 08 Jan 2008
Posts: 18
Location: delhi

PostPosted: Fri Jan 11, 2008 7:11 pm    Post subject:
Reply with quote

Its working fine now.
what can i do to fill the first two fields in output file with spaces alone.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Sat Jan 12, 2008 5:47 pm    Post subject:
Reply with quote

replace the REFORMAT statement like this
Code:
REFORMAT FIELDS=(C'  ',F1:3,195)   


Its an untested suggestion. Please let us know if you have any problem in using this
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 compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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