Rajini can use ICETOOL utility rather than COBOL.
Code: Select all
//JS010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//*
//IN DD * input file1
11111
22222
// DD * input file2
33333
11111
/*
//OUT1 DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT1) ON(1,5,ZD) FIRSTDUP
/*
Output will be -> Record 11111 will be written into the O/P file.
ON(1,5,ZD) -> This declaration has to be changed accordingly based on the account num length
and datatype.
IN and OUT1 DD's can be substituted as below to deal with files.
Code: Select all
//IN DD DSN=FILE1,DISP=SHR
// DD DSN=FILE2,DISP=SHR
//OUT1 DD DSN=OUTFILENAME,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(1,2),RLSE)
NOTE: Few things which we need to be careful about
a) Whether there will be any dups in file1 or file1
b) If dups,do we want to capture all dups or only first dup.
Based on your requirement the job can be changed accordingly.
Thanks,
Veera