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

A question about icetool


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

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Wed Dec 07, 2005 3:49 pm
Reply with quote

there is 3 fiels. file1 is a FB/508 Qsam file. File2 is a FB/132 Qsam file.
file3 is FB/200 Vsam file.

file1 's column 1-3 is same with file2 's column 3-5 and file3 's column 1-3.
file1's column 4-22 is same with file2's column 11-29 and files' column 4-22.

now, i want to create file3 using icetool based on file1 and file2.

can anyone show me a jcl example?

thanks.
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Wed Dec 07, 2005 3:51 pm
Reply with quote

the files 3 is non-dupilicated.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Wed Dec 07, 2005 4:05 pm
Reply with quote

Quote:
now, i want to create file3 using icetool based on file1 and file2.

Means What.... Based on what conditions you want to write a record in file-3.

Better to show an input example....

Regards,

Priyesh.
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Wed Dec 07, 2005 4:40 pm
Reply with quote

files3's 1-22 columns should come from : either file1 's 1-22 or file2's 3-5 columns plus 11-29 columns.

for example:

if file1:

Code:

111abcdefghijklmnopqrstuv
222bcdefghijklmnopqrstuvw
333cdefghijklmnopqrstuvwx


if file2:

Code:

  333      cdefghijklmnopqrstuvwx
  444      defghijklmnopqrstuvwxy


then file3 should be:

Code:

111abcdefghijklmnopqrstuv
222bcdefghijklmnopqrstuvw
333cdefghijklmnopqrstuvwx
444defghijklmnopqrstuvwxy
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Wed Dec 07, 2005 4:42 pm
Reply with quote

other bytes of file3 should be spaces.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Dec 07, 2005 9:29 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/508)
//IN2 DD DSN=...  input file2 (FB/132)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=...  output file (FB/200 VSAM)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,3,CH) FIRST VSAMTYPE(F)
/*
//CTL1CNTL DD *
  OUTREC FIELDS=(1,200)
/*
//CTL2CNTL DD *
  OUTREC FIELDS=(3,3,11,22,200:X)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Thu Dec 08, 2005 12:51 pm
Reply with quote

thanks frank.

i TRY code a jcl like this, AND success.
Code:

//TOOL EXEC PGM=ICETOOL,REGION=1024K                           
//TOOLMSG  DD SYSOUT=A                                         
//DFSMSG   DD SYSOUT=A                                         
//TOOLIN   DD *                                               
 SELECT FROM(IN1) TO(T1) ON(1,22,CH) FIRST                     
 COPY FROM(T1) USING(CTL1) VSAMTYPE(F)                         
 SELECT FROM(IN2) TO(T2) ON(3,3,CH) ON(11,19,CH) FIRST         
 COPY FROM(T2) USING(CTL2) VSAMTYPE(F)                         
/*                                                             
//IN1      DD DSN=file1 (fb/508),DISP=SHR             
//IN2      DD DSN=file2 (fb/132),,DISP=SHR             
//T1       DD DSN=&&T1,UNIT=3390,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2       DD DSN=&&T2,UNIT=3390,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT      DD DSN=FILE3(FB/200),DISP=SHR             
//CTL1CNTL DD *                                               
 SORT FIELDS=(1,22,CH,A)                                       
 OUTFIL FNAMES=OUT,OUTREC=(1,22)                               
/*                                                             
//CTL2CNTL DD *                                               
 SORT FIELDS=(3,3,CH,A,11,19,CH,A)                             
 OUTFIL FNAMES=OUT,OUTREC=(1:3,3,4:11,19)           
/*
Back to top
View user's profile Send private message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Thu Dec 08, 2005 5:06 pm
Reply with quote

can u pl explain yr code?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Dec 08, 2005 9:44 pm
Reply with quote

killms,

I'm not sure what you're doing or why you didn't just use the job I supplied, but since you have DISP=SHR for //OUT, you will only get the output records from the second COPY. You'd need DISP=MOD to get the records from both COPYs.
Back to top
View user's profile Send private message
killms

New User


Joined: 17 Sep 2003
Posts: 16

PostPosted: Tue Dec 13, 2005 8:49 am
Reply with quote

hi,framk

I have finished tmy jcl before you post the answer. so, I post my jcl just to show ICETOOL 's plentiful funtions. ^_^

I think your jcl is more concise than mine. icon_sad.gif
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 Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Question for file manager IBM Tools 7
Search our Forums:

Back to Top