Khupe
New User
Joined: 22 Sep 2020 Posts: 1 Location: Asia
|
|
|
|
Hi,
I need to join 2 files and write matching records to output. Below are the details of file.
File 1 - VB/LRECL=80
File 2 - FB/LRECL=350
File 1 Keys : 1-8, 9-16
File 2 Keys : 12-19, 46-53
Join of keys: 1-8 vs 12-19 and 9-16 vs 46-53
Also I need to OMIT below records from join operation
- those with * in 1st pos of File 1
- those with 'IGNORE' in 1st 6 bytes of File 2
I've tried with below code, but my job ends with RC=0 and the output file is blank and I'm sure there are matching records in both files. Can anybody please let me know if you think something is incorrect here. Thanks.
Code: |
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DISP=SHR,DSN=File 1
//SORTJNF2 DD DISP=SHR,DSN=File 2
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS FILE=F1,FIELDS=(5,8,A,13,8,A),
OMIT=(5,1,CH,EQ,C'*')
JOINKEYS FILE=F2,FIELDS=(12,8,A,46,8,A),
OMIT=(1,6,CH,EQ,C'IGNORE')
REFORMAT FIELDS=(F2:12,43)
SORT FIELDS=(1,43,CH,A)
DUPKEYS FIELDS=NONE
OUTFIL FNAMES=SORTOUT,VTOF,BUILD=(1,18,1X,19,24)
|
Below is the SYSOUT from the step
Code: |
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER276B SYSDIAG= 299500, 14716473, 14716473, 42790950
WER164B 30,156K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 29,028K BYTES USED
WER146B 20K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 43, TYPE = F
WER110I SORTOUT : RECFM=FB ; LRECL= 43; BLKSIZE= 27993
WER074I SORTOUT : DSNAME=<output file>
WER410B 29,128K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B 0 BYTES RESERVE REQUESTED, 28,032K BYTES USED
WER036B G=80391
WER045C END SORT PHASE
WER405I SORTOUT : DATA RECORDS OUT 0; TOTAL RECORDS OUT 0
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B OUTFIL WAS USED FOR SORTOUT
WER246I FILESIZE 0 BYTES
WER054I RCD IN 0, OUT 0
WER072I EQUALS, BALANCE IN EFFECT
WER169I RELEASE 2.1 BATCH 0539 TPF LEVEL 6.0
WER482I JNF1 STATISTICS
WER483B 1,824K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 2,496K BYTES USED
WER108I SORTJNF1 : RECFM=VB ; LRECL= 80; BLKSIZE= 27998
WER073I SORTJNF1 : <File 1>
WER483B 792K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER483B 0 BYTES RESERVE REQUESTED, 1,516K BYTES USED
WER483B G=1118,SEGLEN=1832
WER484I SORTJNF1 : RCD IN= 10,OMITTED= 6,PAIRED= 0,UNPAIRED= 4
WER416B SORTJNF1 : EXCP'S=2,UNIT=3390,DEV=61B1,CHP=(BCFC783C3A38,1),VOL=ATST32
WER416B TOTAL OF 2 EXCP'S ISSUED FOR SORTING
WER487I FILESIZE 76 BYTES
WER482I JNF2 STATISTICS
WER483B 14,088K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 13,600K BYTES USED
WER108I SORTJNF2 : RECFM=FB ; LRECL= 350; BLKSIZE= 27650
WER073I SORTJNF2 : DSNAME=<File 2>
WER483B 13,056K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER483B 0 BYTES RESERVE REQUESTED, 13,056K BYTES USED
WER483B G=3051,B=150,BIAS=93
WER483B 0 PREALLOCATED SORTWORK TRACKS, 2,175 DYNAMICALLY ALLOCATED,
WER483B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL 2,096 TRACKS USED
WER484I SORTJNF2 : RCD IN= 365223,OMITTED= 58095,PAIRED= 0,UNPAIRED= 307128
WER333I ZHPF USED FOR INPUT
WER416B SORTJNF2 : EXCP'S=263,UNIT=3390,DEV=6211,CHP=(18987C7A9AD8,1),VOL=ANDV
WER416B JNF2WK01 : EXCP'S=10,UNIT=3390,DEV=60B4,CHP=BCFC783C3A38,VOL=AWRK35
WER416B JNF2WK02 : EXCP'S=6,UNIT=3390,DEV=67AA,CHP=BCFC783C3A38,VOL=AWRK12
WER416B JNF2WK03 : EXCP'S=3,UNIT=3390,DEV=66A1,CHP=BCFC783C3A38,VOL=AWRK19
<Removed few work dataset logs>
WER416B TOTAL OF 121 EXCP'S ISSUED FOR SORTWORKS
WER416B TOTAL OF 384 EXCP'S ISSUED FOR SORTING
WER487I FILESIZE 107,494,800 BYTES
WER052I END SYNCSORT - $SORTFIL,XTRELMT,,DIAG=C000,C213,E892,EC75,897E,6CAB,22
WER052I DIAG1=C400,52C0,E892,2C75,8D6E,68EB,2640,2666,0100,0103
WER052I DIAG2=A300,F81F,8A92,E0C6,EB6E,4CA3,8A40,6467,0100,0103 |
|
|