The following DFSORT/ICETOOL JCL will give you the desired results based on this assumption.
1. All your search strings in file 2 starts with a word "TBIGxxx".(we can modify to look for other strings also)
2. There can be only 1 occurance of TBIGxxx in your file-2 per record and it doesn't have any duplicates (we can handle duplicates also, let me know if you want to handle them also)
Brief explanation of the Job.
1.Step0100 - Copy the key contents from 80 byte file1 to pos 89 for 7 bytes and write to temp file t1
2.Step0200 - Use Parse to capture the 7 bytes starting with TBIG in your 88 byte file and put that at the end i.e pos 89 and write it temp file t2
3. Now concatenate these 2 files and any matching recording will be a dupe and since we only wanted the records from file 2 , we use the LASTDUP parm to get the desired results
Code: Select all
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
TBIG100
TBIG200
TBIG980
//SORTOUT DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(89:1,7)
//*
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
XMART_C%F#N_TBIG800_FINTE%AM
PRIN%CE%TON_FINTEAM_BAR%^*&SA_TBIG200
OVERLAY*&_COMPO%$%ITT_TBIG100
XMART_CAPT#*_09900_TBIG910
JUMPR%&_TBIG980_RSECUR@@_FIN
//SORTOUT DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INREC PARSE=(%00=(STARTAT=C'TBIG',FIXLEN=7)),
OVERLAY=(89:%00)
/*
//STEP0300 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&T1,DISP=SHR
// DD DSN=&&T2,DISP=SHR
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(89,7,CH) LASTDUP
/*
The output from this job is
Code: Select all
OVERLAY*&_COMPO%$%ITT_TBIG100
PRIN%CE%TON_FINTEAM_BAR% *&SA_TBIG200
JUMPR%&_TBIG980_RSECUR@@_FIN