Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Getting Mutiple input from Panels vidyaa CLIST & REXX 12 Mon Aug 14, 2017 1:28 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us