IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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

Moderator


Joined: 07 Sep 2006
Posts: 1566
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts JOINKEYS to match two input files on ... DFSORT/ICETOOL 3
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10
No new posts Populating Date and Sequence numer in... SYNCSORT 11
No new posts VSAM Open During Copy-Excessive EXCP ... JCL & VSAM 1
No new posts Insert System Runtime in HEADER In SY... SYNCSORT 9

Back to Top