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
 

 

A question about icetool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: A question about icetool
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    Post subject: i forget some note.
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: 1452
Location: Chicago, IL

PostPosted: Wed Dec 07, 2005 4:05 pm    Post subject: Re: A question about icetool
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    Post subject:
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    Post subject:
Reply with quote

other bytes of file3 should be spaces.
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: Wed Dec 07, 2005 9:29 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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    Post subject:
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    Post subject: Re: A question about icetool
Reply with quote

can u pl explain yr code?
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 Dec 08, 2005 9:44 pm    Post subject:
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    Post subject:
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    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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm


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