Joinkeys on a file where position of the field is not fixed



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

Joinkeys on a file where position of the field is not fixed

Postby gadde9 » Thu Dec 26, 2019 11:17 pm

Hi All,

Below is my scenario,

FIle 1:
H1,X1,Y1,Z1
H2,X2,Y2,Z2
H3,X3,Y3,Z3

File 2:

A1|B1|C1|X1|G1
A2||C2|X2|G2
A3|||X1|G1

I need to match X1 in both the files, in FIle 1 X1 is at a fixed position but in File 2 X1 is not at a fixed position, it always comes after three | symbols, is there a way to compare two fields mentioned using sort (Joinkeys) and if match found then replace H* with G*
gadde9
 
Posts: 8
Joined: Thu Jul 19, 2018 8:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Joinkeys on a file where position of the field is not fi

Postby NicC » Fri Dec 27, 2019 1:14 am

Not a JCL question but a DFSort (or Syncsort) question. Topic moved.
To answer your question - can it be done using JOINKEYS - Yes it can. You will have to PARSE the second dataset first.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Joinkeys on a file where position of the field is not fi

Postby gadde9 » Fri Dec 27, 2019 1:23 am

Thanks Nic, can you help me with a sample JCL for the above ?
gadde9
 
Posts: 8
Joined: Thu Jul 19, 2018 8:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Joinkeys on a file where position of the field is not fi

Postby NicC » Fri Dec 27, 2019 3:25 pm

Sample JCL can be found in the DFSOrt manual chapter 2.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Joinkeys on a file where position of the field is not fi

Postby sergeyken » Fri Dec 27, 2019 6:10 pm

gadde9 wrote:Thanks Nic, can you help me with a sample JCL for the above ?

1) JCL has absolutely nothing to do with your question.

2) This is a HELP forum, not DO-MY-JOB-FOR-ME forum.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 438
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 7 times
Been thanked: 40 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post