Author: migusd
Subject: JOINKEYs and Variable files
Posted: Fri Jun 17, 2016 3:16 am (GMT 5.5)
Hello guys,
I am trying now to compare previous & current for the same file. Trying to catch the records being added, deleted and changed...
But the field I want to compare is a variable one. can be up to 255. Due to limitations on Syncsort Joinkeys, I am setting the field comparison to 64 bytes only....
Example 7 on "Exploiting Syncsort MFX: JOIN" manual is almost the one I need... except that I need the Join keys to be variable, also the input and output files...
so, according to the manual I should use REFORMAT from Section 2.234 of Programmer's Guide....
According to it, because I want the output files to be variable length to, I should add the RDW at the front of the record and the variable fields at the end without a length. I also put both variable fields at the end.
I want to exclude the identical records.
I am including RDWs from both input files, but apparently I need another RDW for each output file.
How can I solve this?
job output shows
here is the sort
Code'd
_________________
shikoulitz
Subject: JOINKEYs and Variable files
Posted: Fri Jun 17, 2016 3:16 am (GMT 5.5)
Hello guys,
I am trying now to compare previous & current for the same file. Trying to catch the records being added, deleted and changed...
But the field I want to compare is a variable one. can be up to 255. Due to limitations on Syncsort Joinkeys, I am setting the field comparison to 64 bytes only....
Example 7 on "Exploiting Syncsort MFX: JOIN" manual is almost the one I need... except that I need the Join keys to be variable, also the input and output files...
so, according to the manual I should use REFORMAT from Section 2.234 of Programmer's Guide....
According to it, because I want the output files to be variable length to, I should add the RDW at the front of the record and the variable fields at the end without a length. I also put both variable fields at the end.
I want to exclude the identical records.
I am including RDWs from both input files, but apparently I need another RDW for each output file.
How can I solve this?
job output shows
Code: |
17.25.48 JOB54633 +WER235A UBADS471,JS0030 , [b] -SORTOF2 OUTREC RDW NOT INCLUDED [/b]17.25.48 JOB54633 IEF450I UBADS471 JS0030 - ABEND=S000 U0016 REASON=00000000 117 117 TIME=17.25.48 17.25.49 JOB54633 U11-656 JOBNAME=UBADS471,STPROC= ,STSTEP= ,AUTO SETUP PARMS |
here is the sort
Code: |
JOIN UNPAIRED,F1,F2 JOINKEYS FILE=F1,FIELDS=(19,64,A) JOINKEYS FILE=F2,FIELDS=(19,64,A) REFORMAT FIELDS=(F1:1,004, RDW F1 F2:1,004, RDW F2 F1:05,013, PREVIOUS TES F2:05,013, CURRENT TES F1:19, PREVIOUS ESRIDNM F2:19), CURRENT ESRIDNM FILL=X'FF' * TYPE=V OMIT COND=(9,13,CH,EQ,22,13,CH,AND,35,255,CH,EQ,290,255,CH) SORT FIELDS=COPY OUTFIL FILES=1, * DELETED ESRIDNMS INCLUDE=(9,1,BI,EQ,X'FF'), BUILD=(RDWD,DTES,PIP,PESR), HEADER2=(10:' DELETED ESRIDNMS',/, 01:'TES #', 15:'ESRIDNM DESCRIPTION') OUTFIL FILES=2, * ADDED ESRIDNMS INCLUDE=(022,1,BI,EQ,X'FF'), BUILD=(RDWA,ATES,PIP,FESR), HEADER2=(10:' ADDED ESRIDNMS',/, 01:'TES #', 15:'ESRIDNM DESCRIPTION') * OUTFIL FILES=3, * CHANGED ESRIDNMS * INCLUDE=(022,1,BI,EQ,X'FF'), * BUILD=(RDWDTES,PIP,DESR,PIP,ATES,PIP,FESR), * HEADER2=(10:' CHANGED ESRIDNMS',/, * 01:'TES #', * 15:'ESRIDNM DESCRIPTION') |
Code: |
DATA DICTIONARY SYMBOLS SUBSTITUTED : JOIN UNPAIRED,F1,F2 JOINKEYS FILE=F1,FIELDS=(19,64,A) JOINKEYS FILE=F2,FIELDS=(19,64,A) REFORMAT FIELDS=(F1:1,004,F2:1,004,F1:05,013,F2:05,013,F1:19,F2:19),FILL=X'FF' OMIT COND=(9,13,CH,EQ,22,13,CH,AND,35,255,CH,EQ,290,255,CH) SORT FIELDS=COPY OUTFIL FILES=1,INCLUDE=(9,1,BI,EQ,X'FF'),BUILD=(1,4,9,13,C'|',35,64),HEADER2=(10 :' DELETED ESRIDNMS',/,01:'TES #',15:'ESRIDNM DESCRIPTION') OUTFIL FILES=2,INCLUDE=(022,1,BI,EQ,X'FF'),BUILD=(5,4,22,13,C'|',290,64),HEADER2 =(10:' ADDED ESRIDNMS',/,01:'TES #',15:'ESRIDNM DESCRIPTION') |
Code: |
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED WER276B SYSDIAG= 5009393, 12351294, 12351294, 9737185 WER164B 46,016K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED, WER164B 0 BYTES ESRERVE REQUESTED, 1,000K BYTES USED WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED WER481I JOINKEYS REFORMAT RECORD LENGTH= 548, TYPE = V WER235A SORTOF2 OUTREC RDW NOT INCLUDED WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000 WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE WER482I JNF1 STATISTICS WER483B 22,776K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED, WER483B 0 BYTES ESRERVE REQUESTED, 1,000K BYTES USED WER108I SORTJNF1 : RECFM=VB ; LRECL= 275; BLKSIZE= 27998 |
Code'd
_________________
shikoulitz