Page 1 of 1

To selcet a particular field using Icetool

PostPosted: Tue Apr 07, 2009 7:33 am
by Sahana
Hi,

Can you please let me know the icetool func, which needs to copy only a particular fields from the input file to the output file.
Suppose the LRECL of the input file is 5000, i need to copy the 1st 200 bytes and the last 10 bytes from all the records.

Re: To selcet a particular field using Icetool

PostPosted: Tue Apr 07, 2009 8:45 pm
by Frank Yaeger
Here's a DFSORT/ICETOOL job that will do what you asked for:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (FB/5000)
//OUT DD DSN=...  output file (FB/210)
//TOOLIN   DD    *
COPY FROM(IN) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC BUILD=(1,200,4991,10)
/*


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: To selcet a particular field using Icetool

PostPosted: Wed Apr 08, 2009 7:44 am
by Sahana
Thanks a lot, Frank.

Yes, ill start reading the DFsort tutorial.