Page 1 of 1

understand how ICETOOL

PostPosted: Sat Mar 29, 2008 4:49 pm
by lestmen
Good Morning
i have 1 one with 600.000.000 of records and i have to write two files on bases to two different condition.
all is ok, i wrote using ICETOLL.
But i see the LOG and i Note that ICETOOL, use however the input file two times. i beleived that ICETOOL use the input-file one time to write two different output records.

my question is
1. is there a way to use the input-file one time to write two different output-file ?
2. if no way, which is the difference using two different step (eg. with PGM SORT) wiht ICETOLL

thank you in advance and sorry to English Mistake
Sergio

Re: understad how ICETOOL

PostPosted: Sat Mar 29, 2008 7:38 pm
by dick scherrer
Hello Sergio and welcome to the forums,

Some processes require multiple passes of the data and some can be accomplished in a single pass.

Please post your jcl and control statements. A bit of sample data of each format may help as well.

Re: understad how ICETOOL

PostPosted: Sat Mar 29, 2008 9:16 pm
by Frank Yaeger
Sergio,

You can use multiple OUTFIL statements with DFSORT or ICETOOL to write two files based on two different conditions. Here are examples with DFSORT and with ICETOOL. The exact job you would use depends on exactly what you want to do.

DFSORT job

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//SYSIN    DD *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(8,1,CH,EQ,C'3')
  OUTFIL FNAMES=OUT2,INCLUDE=(8,1,CH,EQ,C'4')
/*


DFSORT/ICETOOL job

//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=... input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=OUT1,INCLUDE=(8,1,CH,EQ,C'3')
  OUTFIL FNAMES=OUT2,INCLUDE=(8,1,CH,EQ,C'4')
/*


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:

http://www.ibm.com/servers/storage/supp ... tmpub.html

Re: understad how ICETOOL

PostPosted: Sat Mar 29, 2008 11:17 pm
by lestmen
this is the sleketon jcl that i use

//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=... input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//TOOLIN DD *
COPY (IN) TO (OUT1)  USING(CTL1)
COPY (IN) TO (OUT2) USING(CTL2)
/*
//CTL1CNTL DD *
   OPTION COPY
   INCLUDE=(8,1,CH,EQ,C'3')
 //CTL2CNTL DD *
   OPTION COPY
   INCLUDE=(8,1,CH,EQ,C'3')
/*

Re: understad how ICETOOL

PostPosted: Sun Mar 30, 2008 12:57 am
by dick scherrer
Hello,

By comparing your process to what Frank posted, do you see why yours requires 2 passes of the data?

I suggest you change your syntax to be like Frank's (using OUTFIL instead of 2 separate copy commands).

You may have a typo in what you posted as you mention '3' in both copies.

After making that change, let us know if you get the result you want.

Re: understad how ICETOOL

PostPosted: Sun Mar 30, 2008 1:49 am
by lestmen
like performance is it better use the first or second JCL,
to performance i say (eg allocation memory, usage cpy and soon on)

Re: understad how ICETOOL

PostPosted: Sun Mar 30, 2008 2:30 am
by dick scherrer
Hello,

The jcl you created requires 2 complete passes of the input data to create the required output.

Either of the solutions Frank posted should require only one pass of the input data.

I suspect that the performance of Frank's solutions will be very similar and that both of them will require less resources than the jcl you have been using.

Re: understad how ICETOOL

PostPosted: Mon Mar 31, 2008 1:24 am
by Frank Yaeger
is there a way to use the input-file one time to write two different output-file ?


Sergio,

You asked this question and I gave you a way to what you asked for. I don't understand why you would then come back and post the two-pass method you used that doesn't do what you asked for.

I would think it would be obvious that using one pass over the data is better then using two passes over the data which is why you asked for a one pass solution in the first place.

The DFSORT job and ICETOOL job I posted do the same thing and perform the same.

By the way, when you use ICETOOL's COPY operator, you don't need OPTION COPY in CTLxCNTL.

Re: understad how ICETOOL

PostPosted: Fri May 16, 2008 7:13 pm
by bakshi_man
hi There

i've tried the iceman example at my shop , it works really well!!!!

Thanks