Page 1 of 1

Comparing with icetool;Help!

PostPosted: Tue Apr 21, 2009 5:49 pm
by gokulNmf
Hi,
i need the copmare 2 fields in the same record, is it possible using icetool?
record is "05062009xxxxxxxxxxxxxx05062009"
i want to check whether 1,8 and 23,8 are same.
i tried
//STEP1   EXEC  PGM=ICETOOL                             
//TOOLMSG  DD   SYSOUT=*
//DFSMSG   DD   SYSOUT=*
//INPUT1   DD  DSN=SPNO125.DGUS.TEST.PS,                 
//             DISP=SHR                                 
//OUTPT1   DD  DSN=SPNO125.DGUS.TEST.OUTPUT.FILE,       
//             DISP=(,CATLG,DELETE),                 
//             SPACE=(TRK,(3,3,),RLSE)
//TOOLIN   DD *                                         
    SORT FROM(INPUT1) USING(ABCD)                       
/*                                                       
//*                                                     
//ABCDCNTL DD *                                         
  SORT FIELDS=(10,3,CH,A)                               
  OUTFIL FNAMES=(OUTPT1),INCLUDE(1,5,EQ,21,5),FORMAT=CH 
/*                                                       
//*                                                     

Re: Comparing with icetool;Help!

PostPosted: Tue Apr 21, 2009 8:36 pm
by Frank Yaeger
If you want to compare 1,8 and 23,8, why are you using 1,5 and 21,5?

Do you actually want to sort the file or do you just want to copy it? I'll assume you do want to sort it.

The simplest way to INCLUDE the records you want and SORT them would be with a DFSORT job like this:

//STEP1   EXEC  PGM=ICEMAN
//SYSOUT  DD   SYSOUT=*
//SORTIN   DD  DSN=SPNO125.DGUS.TEST.PS,
//             DISP=SHR
//SORTOUT  DD  DSN=SPNO125.DGUS.TEST.OUTPUT.FILE,
//             DISP=(,CATLG,DELETE),
//             SPACE=(TRK,(3,3,),RLSE)
//SYSIN   DD *
  INCLUDE COND=(1,8,CH,EQ,23,8,CH)
  SORT FIELDS=(10,3,CH,A)
/*


If you want to use ICETOOL, you can do the same thing with this equivalent job:

//STEP2   EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN   DD  DSN=SPNO125.DGUS.TEST.PS,
//             DISP=SHR
//OUT  DD  DSN=SPNO125.DGUS.TEST.OUTPUT.FILE,
//             DISP=(,CATLG,DELETE),
//             SPACE=(TRK,(3,3,),RLSE)
//TOOLIN  DD *
SORT FROM(IN) TO(OUT) USING(CTL1)
//CTL1CNTL DD *
  INCLUDE COND=(1,8,CH,EQ,23,8,CH)
  SORT FIELDS=(10,3,CH,A)
/*


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