|
|
| Author |
Message |
dhanashreeakhade
New User
Joined: 11 Mar 2008 Posts: 8 Location: pune
|
|
|
|
I have 2 input files (both with lrecl 2221).
For first file, i have to replace the existing value for last column no. 2221 with '1'.
After this change is implemented in the fisrt file, then I want to merge that to the 2nd file. (2nd file has last column values as either '2' or '3' or '4')
I want 2 outputs to get generated.
Output1 file will have all records from first 2 files. (please remeber that 1st file after doing the above mentioned modification + 2nd file)
Output2 file will have (1st file after doing the above mentioned modification + records from 2nd file having value for column 2221 as '3' or '4' only)
I was able to place a value '1' in the last column of 1st file.. but now I m stucked at the point about how to merge that modified file1 with file2 and use for further processing and don't know how to code that.
This is my JCL
| Code: |
//STEP010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//ACTIVES DD DISP=SHR,DSN=GRMIW9.TEST.M28.EWJDNBWB.ACTIVES
//INACTIVS DD DISP=SHR,DSN=GRMIW9.TEST.DLRDUNS.MATCHED
//TEMP1 DD DSN=&&TEMP1,
// SPACE=(CYL,(100,100),RLSE),
// DCB=(RECFM=FB,LRECL=2221,BLKSIZE=31094)
//MERGE DD DSN=GRMIW9.TEST.M28.WITH1,
// DISP=(NEW,CATLG),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=2221,BLKSIZE=31094)
//TOOLIN DD *
COPY FROM(ACTIVES) TO(TEMP1) USING(ACTS)
/*
//ACTSCNTL DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(2221:C'1')
/*
|
Could u please help me to complete this one to get the desired output?
Thanks in advance.
Dhanashree. |
|
| Back to top |
|
 |
References
|
Posted: Thu Mar 20, 2008 4:25 pm Post subject: Re: ICETOOL to merge 2 input datasets. |
 |
|
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4228 Location: San Jose, CA
|
|
|
|
You can use a DFSORT/ICETOOL job like the following to do what you asked for:
| Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/2221)
//IN2 DD DSN=... input file2 (FB/2221)
//***>>> USE MOD DATA SETS FOR OUT1 AND OUT2
//OUT1 DD DISP=MOD,DSN=... output file1 (FB/2221)
//OUT2 DD DISP=MOD,DSN=... output file2 (FB/2221)
//TOOLIN DD *
COPY FROM(IN1) TO(OUT1,OUT2) USING(CTL1)
COPY FROM(IN2) USING(CTL2)
/*
//CTL1CNTL DD *
INREC OVERLAY=(2221:C'1')
/*
//CTL2CNTL DD *
OUTFIL FNAMES=OUT1
OUTFIL FNAMES=OUT2,INCLUDE=(2221,1,SS,EQ,C'3,4')
/*
|
|
|
| Back to top |
|
 |
dhanashreeakhade
New User
Joined: 11 Mar 2008 Posts: 8 Location: pune
|
|
|
|
Thanks a Lot!
Dhanashree. |
|
| Back to top |
|
 |
|
|
|