Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us