venugopala
New User
Joined: 19 Oct 2006 Posts: 4
|
|
|
|
Hi,
could you please help me in solving the below stated issue
Inputfile1 (lrecl=159) contains some duplicate records, inputfile2 (lrecl=7) contain unique records,
My requirement like as follows
file2 (UNIQUE record)need to be compared with file1(Duplicates) all matched records are need to be written
in to output file
Ex
File 1
Code: |
AAA1111
AAA1111
BBB2222
CCC3333
CCC3333
|
File 2
Expected output
Code: |
AAA1111
AAA1111
CCC3333
CCC3333
|
many thanks in advance |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/159)
//IN2 DD DSN=... input file2 (FB/7)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/159)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(19,7,CH) WITHALL -
WITH(1,160) USING(CTL3)
/*
//CTL1CNTL DD *
INREC BUILD=(19:1,7,160:C'BB')
/*
//CTL2CNTL DD *
INREC OVERLAY=(160:C'VV')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(160,2,CH,EQ,C'VB'),
BUILD=(1,159)
/*
|
|
|