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. I assumed the output could be sorted by the rollno. If you want the output sorted in some other way (e.g in the original order of the file1 or file2 records), let me know.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/50)
//IN2 DD DSN=... input file2 (FB/40)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5,)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/50)
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(21,10,CH) -
WITHALL WITH(1,51) USING(CTL3)
/*
//CTL1CNTL DD *
INREC OVERLAY=(51:C'BB')
/*
//CTL2CNTL DD *
INREC OVERLAY=(51:C'VV')
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,INCLUDE=(51,2,CH,EQ,C'VB'),
BUILD=(1,30,31:41,10,41:31,10)
/*
|
|
|