INCLUDE/OMIT in ICETOOL



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

INCLUDE/OMIT in ICETOOL

Postby dohara » Wed Jun 23, 2010 2:20 am

Hi all

I need some help to fine tune the below short code.
What i'm trying here is to calculate the number of records that have got the same 6 byte value starting on byte 10. --> ON(10,6,CH)

//SORT002 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=A
//DFSMSG DD SYSOUT=A
//INPUT DD DISP=(OLD),DSN=HLQ.DDD1.DD2
//OUTPUT DD DISP=(OLD),DSN=HLQ.DDD1.XX2
//TOOLIN DD *
OCCUR FROM(INPUT) LIST(OUTPUT) NOHEADER -
ON(10,6,CH) ON(VALCNT,N05)
/*

The above is working fine.
I ,however, need to exclude the first 2 records from processing. I tried the following but it did not work out.
SUBSET FROM(INPUT) TO(OUTPUT) INPUT REMOVE FIRST(2)


Can you help me out as to how to get rid of the first 2 records?
Is there a way to use include/omit in ICETOOL ? I'm reading the docs but any help is welcome.
Both the input and output files are FB, LRECL=80, BLKSIZE=800

thanks,
David
dohara
 
Posts: 42
Joined: Thu Apr 09, 2009 3:15 pm
Has thanked: 0 time
Been thanked: 1 time

Re: INCLUDE/OMIT in ICETOOL

Postby Frank Yaeger » Wed Jun 23, 2010 2:42 am

If you just have the OCCUR operator in //TOOLIN, you could add this:

//DFSPARM DD *
   OPTION SKIPREC=2
/*


Alternatively, you could also use an INCLUDE or OMIT statement in //DFSPARM.

Just note that anything you put in //DFSPARM will be applied to every ICETOOL operator in //TOOLIN.

Here's another way to do it without using //DFSPARM, but it takes two passes:

//SORT002 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=A
//DFSMSG DD SYSOUT=A
//INPUT DD DISP=(OLD),DSN=HLQ.DDD1.DD2
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUTPUT DD DISP=(OLD),DSN=HLQ.DDD1.XX2
//TOOLIN DD *
SUBSET FROM(INPUT) TO(T1) INPUT REMOVE FIRST(2)
OCCUR FROM(T1) LIST(OUTPUT) NOHEADER -
ON(10,6,CH) ON(VALCNT,N05)
/*
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

Re: INCLUDE/OMIT in ICETOOL

Postby dohara » Wed Jun 23, 2010 2:49 pm

Hi Frank

Thanks for your reply.
I tried both ways, both fine. (using option 2)


cheers,
David.
dohara
 
Posts: 42
Joined: Thu Apr 09, 2009 3:15 pm
Has thanked: 0 time
Been thanked: 1 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post