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: 1544
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 Specific Groups V S Amarendra Reddy SYNCSORT 10 Thu Jan 11, 2018 1:16 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Weirdo results with JOINKEYS Balaryan DFSORT/ICETOOL 4 Wed Oct 18, 2017 9:04 pm

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