Posted: Tue Aug 04, 2015 6:41 pm Post subject: DFSORT with JOINKEYS question
I have an input file that includes a list of "good" users:
Code:
//IN1 DD *
DBFM
DB2P
DCSR
I have another input file that includes information about these and other users. If a user on this file is on the "good" user list, I would like to update columns 40 - 80 with all nines (9999999...). There can be more than one entry per user on this list (see DBFM).
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Aug 04, 2015 10:05 pm Post subject:
bmeansdfw,
It is quite simple to get the desired results using Joinkeys. You did not mention the position of the key to be matched and the DCB properties.
I made the following assumptions.
1. It is a good practice to use high volume files as IN1 and the low volume file as IN2.
2. I assumed that the file1 has an LRECL=80 and RECFM=FB and the key is at position 7 for a length of 4 and the data is already sorted on the key. If not you just need to remove the parms SORTED,NOSEQCK on the Joinkeys statement.
3. I assumed that the file2 has an LRECL=80 and RECFM=FB and the key is at position 1 for a length of 4 and the data is already sorted on the key. If not you just need to remove the parms SORTED,NOSEQCK on the Joinkeys statement.
Use the following UNTESTED JCL which will give you the desired results.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Aug 06, 2015 2:39 pm Post subject:
bmeansdfw wrote:
Thanks, Kolusu.
I did have to change INA and INB to SORTJNF1 and SORTJNF2 (and the JOINKEYS reference to them), but once I did that it worked like a charm!
bmeansdfw,
The job posted above works fine asis with DFSORT and if you had to change the INA/INB to SORTJNF1/SORTJNF2 respectively, then you are using syncsort.
Please keep that in mind to quote that in your future posts as it wouldn't be ethical to seek a solution from competitive developer. I'm a DFSORT developer and I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort as DFSORT and Syncsort are competitive products. _________________ Kolusu
www.linkedin.com/in/kolusu
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum