IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort - subtract and copy using JOINKEYS !


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Oct 18, 2013 5:38 pm
Reply with quote

Hi,

I have two files (RECFM=FB, LRECL=80)

File-1:-
Code:

----+----1
abc0071
xyz0123
coj1688
sta1110


File-2:
Code:

----+----1
abc0070
coj1687
brv0009
sta1107


My requirement is to match both files on key starts at 1st byte (length = 3) in each file and calculate difference (number starts at 4th byte and length = 4) between matched records and write -

Output-1 - difference between matched records should be 1
Output-2 - difference between matched records should be more than 1

Expected Output-1:
Code:

----+----1----+----2
abc0071abc0070
coj1688coj1687


Expected Output-2:
Code:

----+----1----+----2
sta1110sta1107


I am succeeded upto JOINKEYS but don't know how to get it to output. Please help.

Thanks.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Oct 18, 2013 6:14 pm
Reply with quote

Do a SUB after reformat

Then based on the output use OUTFIL FNMAES and write to different files
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
Search our Forums:

Back to Top