Comparing with icetool;Help!



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Comparing with icetool;Help!

Postby gokulNmf » Tue Apr 21, 2009 5:49 pm

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 
/*                                                       
//*                                                     
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 118
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 2 times
Been thanked: 0 time

Re: Comparing with icetool;Help!

Postby Frank Yaeger » Tue Apr 21, 2009 8:36 pm

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
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post