Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Thu Aug 19, 2004 12:29 pm Post subject:
Ram,
1. What is the LRECL,RECFM of the files?
2. Post a sample Input and desired output
3. What type of sort product do you have ?(DFSORT,Syncsort)
4. If you do have syncsort then post the realease version of Synctool along with TPF.( This can be found in the toolmsg)
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat Aug 21, 2004 10:09 am Post subject:
Here's a DFSORT/ICETOOL solution:
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file
//TOOLIN DD *
* IN2->T1: File2 records - add '22' id in 191-192
COPY FROM(IN2) TO(T1) USING(CTL1)
* IN1->T1: Get File1 FIRSTDUP records and add 'XX' id in 191-192
SELECT FROM(IN1) TO(T1) ON(1,3,CH) FIRSTDUP USING(CTL2)
* IN1->T1: File1 records - add '11' id in 191-192
COPY FROM(IN1) TO(T1) USING(CTL3)
* T1->OUT: SPLICE on key with 1-191, but not 192.
* Keep records with id in 191-192 of:
* '1X' - Dups in file1 w/o match in file2.
* '11' - nondups in file1 w/o match in file2.
* Remove id.
SPLICE FROM(T1) TO(OUT) ON(1,3,CH) KEEPNODUPS -
WITHALL WITH(1,191) USING(CTL4)
/*
//CTL1CNTL DD *
OUTREC FIELDS=(1,190,191:C'22')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=(T2),OUTREC=(1,190,191:C'XX')
/*
//CTL3CNTL DD *
OUTREC FIELDS=(1,190,191:C'11')
/*
//CTL4CNTL DD *
OUTFIL FNAMES=OUT,
INCLUDE=(191,2,CH,EQ,C'1X',OR,
191,2,CH,EQ,C'11'),
OUTREC=(1,190)
/*
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum