Compare data in two files using JCL



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Compare data in two files using JCL

Postby mounika1041 » Mon Nov 21, 2016 8:13 pm

I have two files. first file is of record length 582 and second file is of length 80.
i have few fields in first file and a field named key which is of 8 length.
in the second file i have only two fields that is new key and old key both are of 8 length.
now i have to compare this two files find if the old key is present in the first file if present then replace the old key with new key which is present in file 2. if there is no match then it should have the same old key and nothing should be changed
i worked with the below code
JOINKEYS FILES=F1,FIELDS=(17,8,A)
JOINKEYS FILES=F2,FIELDS=(10,8,A)
JOIN UNPAIRED,F1 ONLY
REFORMAT FIELDS=(F1:1,16,F2:1,8,F1:25,558)
OPTION COPY
but if they cant find old key in the file it is getting filled with blank, i want the old key as old key if there is no match.. can somebody please help? thanks in advance
file 1----------key starts at position 17 and of length 8
file 2 ---------1-8(new key) 9-16(old key)
mounika1041
 
Posts: 3
Joined: Mon Nov 21, 2016 8:05 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare data in two files using JCL

Postby enrico-sorichetti » Mon Nov 21, 2016 8:18 pm

vey few people will help if You post to the wrong section of the forums

tell us what sort product You will be using.

look at the messages

WER... ==> SYNCSORT
ICE... ==> IBM DFSORT

and the topic will be moved to the proper section
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Compare data in two files using JCL

Postby mounika1041 » Mon Nov 21, 2016 8:24 pm

sorry, this is the first time i am posting.. so i didnot know where exactly to post.. i am using syncsort :D
mounika1041
 
Posts: 3
Joined: Mon Nov 21, 2016 8:05 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Compare data in two files using JCL

Postby enrico-sorichetti » Mon Nov 21, 2016 9:19 pm

so i didnot know where exactly to post..


it seems to me that the list of the forums section is clear enough :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post