Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
Author Message
dhanashreeakhade

New User


Joined: 11 Mar 2008
Posts: 8
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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
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: 8
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Need input in Scheduling Benchwarmer CA Products 5 Tue Jun 06, 2017 1:44 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us