Page 1 of 1

count records only match with particular group

PostPosted: Fri Mar 02, 2012 3:58 am
by dn2012
Hello,

I have a flat file (member) with data. I run following JCL to find position.

//********************************************************************* 
//*  USE ICETOOL TO DIAGNOSE DATA IN THE DS AT PARTICLAR POSITIONS       
//********************************************************************   
//S1    EXEC  PGM=ICETOOL                                               
//TOOLMSG DD SYSOUT=*                                                   
//DFSMSG  DD SYSOUT=*                                                   
//IN DD DSN=IMSTESTA.IMF310.ITD.SOURCE(TCIS0228),DISP=SHR               
//RPT DD SYSOUT=*                                                       
//TOOLIN DD *                                                           
  OCCUR FROM(IN) LIST(RPT) ON(25,7,CH) ON(VALCNT)                       
/*                                                                       
******************************** Bottom of Data *************************


But now I want to count records only match with particular group in IMSTESTA.IMF310.ITD.SOURCE(TCIS0228).

thanks

Re: count records only match with particular group

PostPosted: Fri Mar 02, 2012 4:07 am
by steve-myers
You are asking for the work product of a professional. Professionals expect to be paid. If you are interested in paying a professional, leave a message here and someone may contact you using the private mail facility of this forum. Please be patient; few people seem to be willing to pay, so it may be some time before a qualified professional willing to perform this task will read your post.

Re: count records only match with particular group

PostPosted: Fri Mar 02, 2012 4:26 am
by Frank Yaeger
dn2012,

You can use an INCLUDE statement in DFSPARM to select records from a particular group for OCCUR processing, e.g.

//DFSPARM DD *
   INCLUDE COND=(....)
/*


But keep in mind that the statements in DFSPARM will be applied to ALL of the ICETOOL operators in TOOLIN.

If you only have the OCCUR operator in TOOLIN, then DFSPARM is fine. If you have other operators in TOOLIN and you only want to have the INCLUDE used for the OCCUR operator, you'll need to do a COPY with INCLUDE to a temporary data set and use the output from that as the input to the OCCUR operator.

Re: count records only match with particular group

PostPosted: Fri Mar 02, 2012 5:38 am
by dn2012
//S1    EXEC  PGM=ICETOOL                                 
//TOOLMSG DD SYSOUT=*                                     
//DFSMSG  DD SYSOUT=*                                     
//IN DD DSN=IMSTESTA.IMF310.ITD.SOURCE(TCIS0228),DISP=SHR
//RPT DD SYSOUT=*                                         
//TOOLIN DD *                                             
  OCCUR FROM(IN) LIST(RPT) ON(20,7,CH) ON(VALCNT)         
//DFSPARM DD *                                           
  INCLUDE COND=(MCIPROB)                                 
/*                                                       

***********************
 ICE200I J IDENTIFIER FROM CALLING PROGRAM IS 0001                             
 ICE000I I - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 16:04 ON THU M
0            INCLUDE COND=(MCIPROB)                                             
                           $                                                   
 ICE006A 0 OPERAND DEFINER ERROR

Re: count records only match with particular group

PostPosted: Fri Mar 02, 2012 6:20 am
by Frank Yaeger
Good grief. You have to use valid syntax for the INCLUDE statement:

INCLUDE COND=(MCIPROB)


is invalid syntax. Valid syntax would be something like this (b represents a leading blank):

bbINCLUDE COND=(25,7,CH,EQ,C'MCIPROB')


You need to build on what you've learned before (I know you had a valid INCLUDE statement for another job previously).

Re: count records only match with particular group

PostPosted: Fri Mar 02, 2012 6:34 am
by dn2012
thanks its work