Author: Steve Ironmonger
Subject: SORTJOIN - Copy Matched and Unmatched to the same File
Posted: Tue Jan 17, 2017 4:26 pm (GMT 5.5)
I was wondering if anybody could help me with a minor niggle I have....
I've created a Data Mining job that starts with a list of account numbers and builds up the different characteristics for each account from lots of different input files.
As not all of the accounts have a data on the other files, when I update a field on the base file, I create a new file of matched records and then have to re-merge (sort-dedupe) the original base file with the new file so I've always got the same number of records I started out with :-
Is there any way to code the above in 1 step rather than the 2 that i'm currently using ?
The above works perfectly fine, but I'm now up to 17 of these in my datamining job and it's starting to add quite a bit of time/cpu onto the job when it runs.
Any help would be greatly appreciated.
cheers
Steve
Subject: SORTJOIN - Copy Matched and Unmatched to the same File
Posted: Tue Jan 17, 2017 4:26 pm (GMT 5.5)
I was wondering if anybody could help me with a minor niggle I have....
I've created a Data Mining job that starts with a list of account numbers and builds up the different characteristics for each account from lots of different input files.
As not all of the accounts have a data on the other files, when I update a field on the base file, I create a new file of matched records and then have to re-merge (sort-dedupe) the original base file with the new file so I've always got the same number of records I started out with :-
Code: |
********************************************************************** //*** MERGE ORDER TOTALS INTO ACCOUNT LIST //********************************************************************** //STEP180 EXEC PGM=SORT,COND=(0,LT) //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTJNF1 DD DISP=SHR,DSN=MINED.DATA.BASE //SORTJNF2 DD DISP=SHR,DSN=ORDER.TOTALS //SORTOUT DD DSN=&&TEMP,DISP=(,PASS),SPACE=(TRK,(4500,1500),RLSE) // DCB=(RECFM=FB,LRECL=323,BLKSIZE=0), //SYSIN DD * JOINKEYS FILES=F1,FIELDS=(1,16,A) JOINKEYS FILES=F2,FIELDS=(1,16,A) REFORMAT FIELDS=(F1:1,51;F2:22,5;F1:57,267) SORT FIELDS=COPY /* //********************************************************************** //*** RE-MERGE UPDATED MINED FILE WITH ORIGINAL MINED FILE //********************************************************************** //STEP190 EXEC PGM=SORT,COND=(0,LT) //SYSOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=D //SORTIN DD DISP=SHR,DSN=&&TEMP // DD DISP=SHR,DSN=MINED.DATA.BASE //SORTOUT DD DISP=OLD,DSN=MINED.DATA.BASE //SYSIN DD * SORT FIELDS=(1,16,CH,A) SUM FIELDS=NONE /* |
Is there any way to code the above in 1 step rather than the 2 that i'm currently using ?
The above works perfectly fine, but I'm now up to 17 of these in my datamining job and it's starting to add quite a bit of time/cpu onto the job when it runs.
Any help would be greatly appreciated.
cheers
Steve