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
 

 

File comparison using sort card.

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

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Wed Mar 31, 2010 5:06 pm    Post subject: File comparison using sort card.
Reply with quote

I have two input files File A (LRECL 100, KEY - 13,14) and File B (LREC 124, KEY - 6,14)

Compare File A and File B, if the records are found in both files Write the record from File A to output file and update the 58th position as 'B'

If the record from File A not Present in File B, just copy the record from FileA to Output file without any change.

Please let me know the sort card step for this.

Thanks,
Senthil.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Mar 31, 2010 8:53 pm    Post subject:
Reply with quote

Hello,

Post some sample input data and the output you want from that input.

Also mention the recfm and lrecl of the output and how the output should be formatted - the inputs are different lrecls. . .
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Thu Apr 01, 2010 9:38 pm    Post subject:
Reply with quote

Try the following SyncSort for z/OS JOIN application:
Code:
//SORT1  EXEC PGM=SORT                         
//SORTJNF1 DD DSN=FILE1                               
//SORTJNF2 DD DSN=FILE2                               
//SORTOUT  DD SYSOUT=*                         
//SYSOUT   DD SYSOUT=*                           
//SYSIN    DD *                                   
  JOINKEYS FILE=F1,FIELDS=(13.14,A)             
  JOINKEYS FILE=F2,FIELDS=(6,14,A)             
  JOIN UNPAIRED,F1                               
  REFORMAT FIELDS=(F1:1,100,F2:1,1)
  SORT FIELDS=COPY
  OUTREC IFTHEN=(WHEN=(101,1,CH,NE,C' '),BUILD=(1,57,C'B',59,42)),
         IFTHEN=(WHEN=NONE,BUILD=(1,100))
/*
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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


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