I want to compare the two files at positions 1 with length of 2 bytes character, position 5 with length of 1 character, position 6 of 4 bytes character, position 15 with length of 1 character and position 19 of length 4 packed decimal.
I want the records from file 1 only in the matched file if found in the second file and take the data from the 96th position (7 bytes Packed decimal) and plug it to the 246th position of the matched file, so essntially the matched file will have a LRECL of 252 (245 + 7).
I had tried Joinkeys before but I am not sure if the PD match works or not.. With this I get multiple occurences.
Code:
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=252
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K62149 C6-K90026 C7-K58148 C8-K67572 E9-K60824 C9-BASE E5-K72040 E7-K70685
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 18:35 ON TUE DEC 03, 2013 -
OPTION COPY
JOINKEYS FILE=F1,FIELDS=(1,2,A,5,1,A,6,4,A,15,1,A,19,4,A)
JOINKEYS FILE=F2,FIELDS=(1,2,A,3,1,A,4,4,A,08,1,A,09,4,A)
REFORMAT FIELDS=(F1:1,245,F2:13,7)
ICE411I 0 THIS IS THE JOINKEYS MAIN TASK FOR JOINING F1 AND F2
ICE416I 0 JOINKEYS IS USING THE F1 SUBTASK FOR SORTJNF1 - SEE JNF1JMSG MESSAGES
ICE416I 1 JOINKEYS IS USING THE F2 SUBTASK FOR SORTJNF2 - SEE JNF2JMSG MESSAGES
ICE419I 0 JOINED RECORDS: TYPE=F, LENGTH=252
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K62149 C6-K90026 C7-K58148 C8-K67572 E9-K60824 C9-BASE E5-K72040 E7-K70685
ICE193I 0 ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED
ICE089I 0 ABCDE .S1 . , INPUT LRECL = 252, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=2097152,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=8192,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,COBEXIT=COB2
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE236I 0 OPTIONS: DYNAPCT=10 ,MOWRK=Y
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTOUT
ICE751I 1 EF-BASE F0-K66717 E8-K70685
ICE421I 0 JOINED RECORDS: COUNT=2607
ICE090I 0 OUTPUT LRECL = 252, BLKSIZE = 23436, TYPE = FB
ICE055I 0 INSERT 2607, DELETE 0
ICE054I 0 RECORDS - IN: 0, OUT: 2607
ICE052I 0 END OF DFSORT
If you see in my previous post the IN1 file has 262 records, and I am expecting 262 records but here I get 2607 records.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
sudib19 wrote:
Hi Bill,
I had tried Joinkeys before but I am not sure if the PD match works or not.. With this I get multiple occurences.
You probably have duplicate keys in either one of your files or both files. If you just want the unique values then you just add SUM FIELDS=NONE for the subtasks.
Code:
//*
//JNF1CNTL DD *
SUM FIELDS=NONE
//*
//JNF2CNTL DD *
INREC BUILD=(1,2,5,1,6,4,15,1,19,4,96,7)
SUM FIELDS=NONE
//*