Page 1 of 1

INCLUDE/OMIT in ICETOOL

PostPosted: Wed Jun 23, 2010 2:20 am
by dohara
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

Re: INCLUDE/OMIT in ICETOOL

PostPosted: Wed Jun 23, 2010 2:42 am
by Frank Yaeger
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)
/*

Re: INCLUDE/OMIT in ICETOOL

PostPosted: Wed Jun 23, 2010 2:49 pm
by dohara
Hi Frank

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


cheers,
David.