Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You need to show an example of your input records and what you expect for output. "Compare ... and write into out file " does not adquately tell us what you want to do. Write what into the output file? Records from input1 that match input2? Records from input2 that match input1? Records from input1 and input2 that match?
If input1 can have duplicates within it, show that in your example. If input2 can have duplicates within it, show that in your example. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I think I get the idea, but some of your details aren't consistent, so I'm going to have to make some assumptions.
For File1, you say RECORDTYPE= start=12 length =01, but in the example of the File1 records, the RECORDTYPE appears to be in position 10, not in position 12. I'll assume it's in position 10.
For the output file, you show 1-5 and then 5-404, so there's an overlap. I'm going to assume that you want the output records to have the
5-byte ACC-ID in positions 1-5, the 1-byte RECORDTYPE in position 6, and *s for the rest of the record.
Given those assumptions, 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 (VB/604)
//IN2 DD DSN=... input file2 (FB/200)
//IN2 DD DSN=&&I2,DISP=(OLD,PASS)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/404)
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,5,CH) FIRSTDUP USING(CTL3)
/*
//CTL1CNTL DD *
INCLUDE COND=(10,1,CH,EQ,C'C')
OUTFIL FNAMES=T1,VTOF,BUILD=(5,6)
/*
//CTL2CNTL DD *
INREC BUILD=(1,5,X)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,OMIT=(6,1,CH,EQ,C' '),
OVERLAY=(7:398C'*')
/*
|
|
|