requirement is:
have a datasets aaa.bbb.ccc.
got members like a1,b1,c1,d1
each member (a1) have around 10 records, i want to count the number of records based on specific condition like the line have "CA" , like this i need to count in all members in a dataset.
the condition is same for all members as of now.
i am able to count the required record in all members individualy in each step but looking for possibility to do same for entire dataset.
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
HappySrinu,
in the rexx manuel (or the ispf edit and edit macros) there is an example of ALLMEMS (or something like that) which provides an example of a rexx script which uses the LMM... utilities to access the name of of each pds member, then invokes ISPF EDIT with an IMACRO. Your 'singleton-counter' would be the IMACRO in this case.
OUTFIL FNAMES=OUT,INCLUDE=(2,80,SS,EQ,C'CA'),
REMOVECC,NODETAIL,
SECTIONS=(130,8,
TRAILER3=('NO :OF LINES FOUND IN MEMBER ',130,8,
' FOR THE STRING CA ARE : ',COUNT))
/*
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Happysrinu,
You can replace the DFSORT/ICETOOL step above with an an easier and more efficient way using the new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008):
Code:
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&T1,DISP=SHR
//SORTOUT DD SYSOUT=*,RECFM=FB
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,6,CH,EQ,C'MEMBER'),PUSH=(82:15,8))
OUTFIL INCLUDE=(2,80,SS,EQ,C'CA',AND,2,6,CH,NE,C'MEMBER'),
REMOVECC,NODETAIL,
SECTIONS=(82,8,
TRAILER3=('NO :OF LINES FOUND IN MEMBER ',82,8,
' FOR THE STRING CA ARE : ',COUNT))
/*
For complete details on the new WHEN=GROUP function and the other new functions available with PTF UK90013, see: