Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Tue Jun 14, 2005 9:08 am Post subject:
Ambi,
Check the 13th post from the bottom. This does almost everything you asked for, except you would miss the HDR record. I am assuming that KEEPBASE of splice operator will able to retain the base record also.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jun 14, 2005 10:19 am Post subject:
Ambi,
If you have z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004), you can do this more easily and efficiently using DFSORT's new IFTHEN, OVERLAY and KEEPBASE functions as shown in the DFSORT/ICETOOL job below. Only DFSORT has these functions, so if you don't have DFSORT, you won't be able to use them. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
KEY1 A
B
C
KEY2 A
B
C
D
KEY3 A
B
C
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN) TO(T1) USING(CTL1)
SPLICE FROM(T1) TO(OUT) ON(81,8,ZD) -
WITHALL WITH(5,76) KEEPBASE USING(CTL2)
/*
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,3,CH,EQ,C'KEY'),
OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=NONE,
OVERLAY=(89:SEQNUM,8,ZD,
81:81,8,ZD,SUB,89,8,ZD,M11,LENGTH=8))
/*
//CTL2CNTL DD *
OUTFIL FNAMES=OUT,OUTREC=(1,80)
/*
_________________ 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
Thatz Great. It is working .. I did change little bit as I dont have Key identifier. Instead of KEY1 , KEY2 I have some Employee Serials .. But i am able to manage.
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