IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

use of icetool to concatenate records from different files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Jan 06, 2010 11:19 pm
Reply with quote

I'm having a hard time recreating your data and figuring out what you want for output. It would have helped if you'd shown an example of input and output with just the relevant fields.

I see I also had an error - WITH(251,9) should have been WITH(251,1). I've corrected that in the example above and in the new one here.

Try this DFSORT/ICETOOL job and see if it does what you want:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=... input file1 (FB/260)
//IN2 DD DSN=... input file1 (FB/200)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/250)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(111,10,CH) KEEPNODUPS WITHALL -
  WITH(1,191) WITH(251,1) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(111:1,10,192:13,15,251:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(251:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(251,2,SS,EQ,C'VB,VV'),
     IFOUTLEN=250,
     IFTHEN=(WHEN=(251,2,CH,EQ,C'VB'),
        BUILD=(1,250)),
     IFTHEN=(WHEN=NONE,BUILD=(1,191))
/*


The INCLUDE operand just keeps records with 'VB' or 'VV' in 251-252.
Back to top
View user's profile Send private message
bhavya_sha

New User


Joined: 16 Apr 2005
Posts: 33

PostPosted: Fri Jan 08, 2010 10:54 am
Reply with quote

hi Frank & Lijo,
I am really sorry if i've troubled you guys . Thank you very much for your precious time and inpupts,
i got required result with below job.
Code:

//STEP01   EXEC PGM=ICETOOL
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN1      DD  DSN=V0C2663.HELP.MATCH.INFILEA,DISP=SHR
//IN2      DD  DSN=V0C2663.HELP.MATCH.INFILEB,DISP=SHR
//T1       DD  DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT      DD  DSN=V0C2663.HELP.MATCH.OUTPUT,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(5,1),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(261,10,CH) KEEPNODUPS WITHALL WITH(271,200)-
 WITH(471,1) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,260,261:1,10,471:C'11')
/*
//CTL2CNTL DD *
   INREC OVERLAY=(261:111,10,271:1,200,471:C'22')
/*
//CTL3CNTL DD *
   OUTFIL FNAMES=OUT,INCLUDE=(471,2,SS,EQ,C'21,22'),
   IFTHEN=(WHEN=(471,2,CH,EQ,C'21'),
   BUILD=(271,191,13,15,44C' ')),
   IFTHEN=(WHEN=NONE,
   BUILD=(271,191,59C' '))
/*

Thanks once again,
Bhavya Merve
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top