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
 
Syncsort - subtract and copy using JOINKEYS !

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - subtract and copy using JOINKEYS !
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: 1567
Location: Andromeda Galaxy

PostPosted: Fri Oct 18, 2013 6:14 pm    Post subject:
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    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 Copy physical Tape files to a Mainfra... Dadi Krishna Teja JCL & VSAM 11 Thu May 16, 2019 10:25 pm
No new posts How to copy\replace the members in pr... abdulrafi JCL & VSAM 6 Fri Mar 22, 2019 7:02 pm
This topic is locked: you cannot edit posts or make replies. Copy one file to possible multiple files dibyendumandal11111 SYNCSORT 9 Fri Mar 08, 2019 2:47 am
No new posts how to copy a sequential dataset by u... javen777 JCL & VSAM 3 Thu Feb 21, 2019 11:37 pm
No new posts LRECL in syncsort frozenblood87 SYNCSORT 4 Tue Feb 19, 2019 6:50 am

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