count records only match with particular group



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

count records only match with particular group

Postby dn2012 » Fri Mar 02, 2012 3:58 am

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: count records only match with particular group

Postby steve-myers » Fri Mar 02, 2012 4:07 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: count records only match with particular group

Postby Frank Yaeger » Fri Mar 02, 2012 4:26 am

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.
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: count records only match with particular group

Postby dn2012 » Fri Mar 02, 2012 5:38 am

//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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: count records only match with particular group

Postby Frank Yaeger » Fri Mar 02, 2012 6:20 am

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).
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: count records only match with particular group

Postby dn2012 » Fri Mar 02, 2012 6:34 am

thanks its work
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post