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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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