Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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: 1568
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 VSAM Open During Copy-Excessive EXCP ... David Beckham JCL & VSAM 1 Sat Jun 27, 2020 5:23 pm
No new posts Insert System Runtime in HEADER In SY... Rick Ryan SYNCSORT 9 Tue May 26, 2020 9:01 pm
No new posts Batch JCL to Copy from Unix Directory... satish.ms10 JCL & VSAM 5 Tue May 19, 2020 7:53 pm
No new posts SYNCSORT in Z/VSE nithinkarthika SYNCSORT 24 Mon May 11, 2020 3:44 pm
No new posts File Manager Copy narinder4075 IBM Tools 1 Thu Apr 30, 2020 9:15 pm

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