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*
Joinkeys on a file where position of the field is not fixed
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Joinkeys on a file where position of the field is not fi
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.
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
Regards
Nic
-
- Posts: 8
- Joined: Thu Jul 19, 2018 8:54 pm
- Skillset: IDMS, ADSo, JCL, Cobol & Assembly language
- Referer: online forums
Re: Joinkeys on a file where position of the field is not fi
Thanks Nic, can you help me with a sample JCL for the above ?
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Joinkeys on a file where position of the field is not fi
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
Regards
Nic
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: Joinkeys on a file where position of the field is not fi
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.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1
- 1224
-
by sergeyken
View the latest post
Tue Nov 08, 2022 7:22 pm
-
- 1
- 3157
-
by sergeyken
View the latest post
Wed Jun 16, 2021 5:13 pm
-
- 1
- 1755
-
by sergeyken
View the latest post
Fri Mar 26, 2021 11:59 pm
-
- 11
- 3610
-
by Pedro
View the latest post
Tue Dec 27, 2022 11:24 am
-
-
Convert fixed-length input records to variable-length output
by xcspg3 » Wed Oct 23, 2024 1:45 pm » in DFSORT/ICETOOL/ICEGENER - 5
- 1415
-
by sergeyken
View the latest post
Wed Oct 30, 2024 1:09 pm
-