Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Thu Jul 17, 2003 5:33 pm Post subject: |
|
|
Hsubra,
Yes, you can do this with the new SPLICE operator of DFSORT's ICETOOL available with DFSORT R14 PTF UQ90053 (Feb, 2003). For complete information on SPLICE, see:
http://www.storage.ibm.com/software/sort/mvs/uq90053/online/srtmutol.html#spl
Here's the DFSORT/ICETOOL job. I've assumed your input files have RECFM=FB and LRECL=80. If not, the job can be adjusted accordingly.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//INPUT1 DD DSN=... input file 1
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
// DD DSN=... input file 2
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=... output file
//TOOLIN DD *
* Reformat input file 1 so it can be spliced with input file 2
COPY FROM(INPUT1) TO(T1) USING(CTL1)
* Splice input file 1 and input file 2 together
SPLICE FROM(CON) TO(T2) ON(16,4,CH) WITHALL WITH(1,13)
* Sort on the # field
SORT FROM(T2) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
OUTREC FIELDS=(16:1,4,25:8,12,80:X)
/*
//CTL2CNTL DD *
SORT FIELDS=(1,3,CH,A)
/*
|
_________________ 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 |
|