Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ICETOOL to merge 2 input datasets.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
dhanashreeakhade

New User


Joined: 11 Mar 2008
Posts: 6
Location: pune

PostPosted: Thu Mar 20, 2008 4:25 pm    Post subject: ICETOOL to merge 2 input datasets.
Reply with quote

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
View user's profile Send private message
References
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 4621
Location: San Jose, CA

PostPosted: Thu Mar 20, 2008 8:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dhanashreeakhade

New User


Joined: 11 Mar 2008
Posts: 6
Location: pune

PostPosted: Mon Mar 24, 2008 11:41 am    Post subject:
Reply with quote

Thanks a Lot!

Dhanashree.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1