I have two VB files that I am trying to perform a match merge. IN File1 has RECFM=VB, LRECL=31996 and File2 has RECFM=VB,
LRECL=31996. File1 has the key in positions 6-10, and File2 has the key in positions 13-17. Both files contain binary data.
Key in File1 is unsigned packed with size 4.5, and starts at position 5.5. Key is File2 has the same property and starts at position 12.5. Since I don't know how to skip half byte, I am using my key
Position that I want to overlay in OUT1 starts in position 133 and has a size of 1. I want to replace this position with X'AA' in the output file that contains records of file1 only.
I am receiving syntax error while overlaying:
OUTFIL FNAMES=OUT1,
IFTHEN=(WHEN=(5,2,CH,EQ,C'BB',&,246,2,BI,EQ,X'AA'),
OVERLAY=(246:X'BB')),
IFTHEN=(WHEN=(5,2,CH,EQ,C'BB'),BUILD=(1,4,14))
Here is my JCL:
//MATCH EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*************************************************************
//* UNLOAD FILE FOR THIS WEEKS DATA
//*************************************************************
//IN1 DD DSN=MYID.MYJOB.F011.@PREV,DISP=SHR
//*************************************************************
//* UNLOAD FILE FOR PREVIOUS WEEKS DATA
//*************************************************************
//IN2 DD DSN=MYID.MYJOB.NODE3.@CURR.LAFFENT,DISP=SHR
//T1 DD DSN=MYID.MATCH70.T1,
// SPACE=(&ALLOC,(&PQTY,&SQTY)),UNIT=(,&VOL),
// DISP=(MOD,PASS)
//*************************************************************
//* MATCH RECORDS BASED ON TIN+MFT+TAXPERIOD(YYYYMM)
//*************************************************************
//MATCHING DD DSN=MYID.MATCH70.OUT12,
// SPACE=(&ALLOC,(10,20),RLSE),
// UNIT=(,32),
// DISP=(,CATLG,DELETE)
//*************************************************************
//* NUMBER OF MATCHING RECORDS
//*************************************************************
//CT12 DD DSN=MYID.MATCH70.CT12,
// SPACE=(&ALLOC,(10,20),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//*************************************************************
//* RECORDS ONLY IN CURRENT WEEK. RECORDS THAT ARE NOT COMMON
//* WITH PREVIOUS WEEK DATA.
//* RECORDS COUNT IN CURRENT WEEK ONLY.
//*************************************************************
//OUT1 DD DSN=MYID.MATCH70.OUT1,
// SPACE=(&ALLOC,(10,20),RLSE),
// UNIT=(,32),
// DISP=(,CATLG,DELETE)
//CT1 DD DSN=MYID.MATCH70.CT1,
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//*************************************************************
//* RECORDS ONLY IN PREVIOUS WEEK
//*************************************************************
//OUT2 DD DSN=MYID.MATCH70.OUT2,
// SPACE=(&ALLOC,(10,20),RLSE),
// UNIT=(,32),
// DISP=(,CATLG,DELETE)
//*************************************************************
//* ENTITY CHANGE RECORD COUNT IN THIS WEEK
//*************************************************************
//OUTENT DD DSN=MYID.MATCH70.OUTENT,
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//ALLENT DD DSN=MYID.MATCH70.ALLENT,
// SPACE=(&ALLOC,(150,10),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//CT2 DD DSN=MYID.MATCH70.CT2,
// SPACE=(TRK,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//KEY1 DD DSN=MYID.MATCH70.KEY1,
// SPACE=(&ALLOC,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//KEY2 DD DSN=MYID.MATCH70.KEY2,
// SPACE=(&ALLOC,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//KEY3 DD DSN=MYID.MATCH70.KEY3,
// SPACE=(&ALLOC,(1,1),RLSE),
// UNIT=SYSDA,
// DISP=(,CATLG,DELETE)
//****************************************************************
//* File1 has RECFM=VB, LRECL=31996 and no duplicates, and File2 has RECFM=VB,
//* LRECL=31996 and duplicates. File1 has the key in positions 6-10,
//* and File2 has the key in positions 13-17.
//****************************************************************
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(MATCHING) ON(19,5,BI) WITH(5,1) -
USING(CTL3) KEEPNODUPS VLENOVLY
/*
//CTL1CNTL DD *
INREC BUILD=(1,4,5:C'BB',14:5)
/*
//CTL2CNTL DD *
INREC BUILD=(1,4,5:C'VV',7:5)
/*
//*IFTHEN=(WHEN=(5,2,CH,EQ,C'BB'),BUILD=(1,4,14))
//* OVERLAY=(246:X'00'))
BUILD=(1,4,246,4)
//CTL3CNTL DD *
OUTFIL FNAMES=MATCHING,INCLUDE=(5,2,CH,EQ,C'VB'),BUILD=(1,4,14)
**************************************************************
* Reformat the OUT1 data set. If Position 233 contains X'AA',
* replace with X'00'.
**************************************************************
OUTFIL FNAMES=OUT1,
IFTHEN=(WHEN=(5,2,CH,EQ,C'BB',&,246,2,BI,EQ,X'AA'),
OVERLAY=(246:X'BB')),
IFTHEN=(WHEN=(5,2,CH,EQ,C'BB'),BUILD=(1,4,14))
OUTFIL FNAMES=OUT2,INCLUDE=(5,2,CH,EQ,C'VV'),BUILD=(1,4,14)
OUTFIL FNAMES=ALLENT,BUILD=(1,4,5)
OUTFIL FNAMES=KEY1,INCLUDE=(5,2,CH,EQ,C'BB',&,246,2,BI,EQ,X'AA'),
OVERLAY=(246:X'BB')
OUTFIL FNAMES=KEY2,INCLUDE=(5,2,CH,EQ,C'VB'),BUILD=(1,4,5,20)
OUTFIL FNAMES=KEY3,INCLUDE=(5,2,CH,EQ,C'VV'),BUILD=(1,4,5,20)
OUTFIL FNAMES=CT12,INCLUDE=(5,2,CH,EQ,C'VB'),
REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=10))
OUTFIL FNAMES=CT1,INCLUDE=(5,2,CH,EQ,C'BB'),
REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=10))
OUTFIL FNAMES=CT2,INCLUDE=(5,2,CH,EQ,C'VV'),
REMOVECC,NODETAIL,
TRAILER1=(COUNT=(M10,LENGTH=10))
/*