I Need to compare two files on a key field which is at different positions and if matching record is found some part of the record from file 1 and complete record from file 2 needs to be written to the output file
input file 1:- lrecl 215 with key at position 1 length 7
input file 2:- lrecl 100 with key at position 87 length 7 has duplicate i want them in the output file as well
This is the jcl i am trying and i am getting errors.
Code: Select all
//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=input file 1,DISP=SHR
//IN2 DD DSN=input file 2,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=output file,DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=250,BLKSIZE=2500),
// UNIT=SYSDA,SPACE=(TRK,(5,1),RLSE)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) ON FIRST USING(CTL1)
COPY FROM(IN1) TO(T1) ON FIRST USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(101,7,CH) -
FIRSTDUP WITH(143,2) USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(1,100,3X,104:1,7,33X,143:C'11')
/*
//CTL2CNTL DD *
INREC OVERLAY=(1,103,104:96,7,110:17,24,135:79,9,143:C'22')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(286,2,CH,EQ,C'12'), -
BUILD=(1,103,104:110,24,128:135,9)
/*
error message
*************
ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN
ICE630I 0 MODE IN EFFECT: STOP
COPY FROM(IN2) TO(T1)ON FIRST USING(CTL1)
$
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER
ICE602I 0 OPERATION RETURN CODE: 12
ICE630I 2 MODE IN EFFECT: SCAN
COPY FROM(IN1) TO(T1)ON FIRST USING(CTL2)
$
ICE604A 0 ERROR IN KEYWORD, PARAMETER, OR DELIMITER