Hello Mr.Yaeger,
My requirement is:
INPUT 1 has no duplicates:
DENIS 01 AAA
MARCO 01 XXX
PAOLO 01 YYY
INPUT 2 has duplicates:
DENIS 01 CCC
DENIS 02 CCC
DENIS 03 CCC
MARCO 01 CCC
MARCO 02 CCC
MARCO 03 CCC
PAOLO 01 CCC
PAOLO 02 CCC
JONNY 01 CCC
JONNY 02 CCC
JONNY 03 CCC
JONNY 04 CCC
Desired OUTPUT-1 file with all matched records:
OUTPUT 1:
DENIS 01 AAA
MARCO 01 XXX
PAOLO 01 YYY
Desired OUTPUT-2 file with all NON matched records from INPUT 2:
OUTPUT 2:
JONNY 01 CCC
JONNY 02 CCC
JONNY 03 CCC
JONNY 04 CCC
I tryed to match 2 INPUT files to produce 1-st Output for all matched records and 2-nd Output for all non matched records from the 2-nd INPUT file:
//MATCH EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
DENIS 01 AAA
MARCO 01 XXX
PAOLO 01 YYY
//IN2 DD *
DENIS 01 CCC
DENIS 02 CCC
DENIS 03 CCC
MARCO 01 CCC
MARCO 02 CCC
MARCO 03 CCC
PAOLO 01 CCC
PAOLO 02 CCC
JONNY 01 CCC
JONNY 02 CCC
JONNY 03 CCC
JONNY 04 CCC
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(1,25)),DISP=(MOD,PASS)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(WK01)
COPY FROM(IN2) TO(T1) USING(WK02)
SPLICE FROM(T1) TO(OUT) ON(1,5,CH) WITH(26,1) USING(WK03) -
KEEPNODUPS
//WK01CNTL DD *
INREC OVERLAY=(25:C'11')
//WK02CNTL DD *
INREC OVERLAY=(25:C'22')
//WK03CNTL DD *
OPTION EQUALS
OUTFIL FNAMES=OUT,INCLUDE=(25,2,CH,EQ,C'12'),BUILD=(1,24)
OUTFIL FNAMES=OUT1,INCLUDE=(25,2,CH,EQ,C'22'),BUILD=(1,24)
The result of all matched records in OUTPUT 1 was correct:
OUTPUT 1:
DENIS 01 AAA
MARCO 01 XXX
PAOLO 01 YYY
The result of all non matched records in OUTPUT 2 was not correct:
OUTPUT 2:
JONNY 01 CCC
How can I get the desired OUTPUT 2 with all duplicates keeping the same result for OUTPUT 1 ? Help me out to deal with this problem please.
Best regards
Denis Dhimitri