View previous topic :: View next topic |
Author |
Message |
alaka27 Beginner
Joined: 11 Apr 2005 Posts: 1 Topics: 1 Location: bangalore
|
Posted: Mon Apr 11, 2005 1:06 am Post subject: ISPF command |
|
|
Hi,
I need to count the number of members present in a PDS using the first 4 letters. For ex: In a PDS C901.LK4.DOCUMENT which has 1894 members with member names like CI05AB1, CI08AE2, MD05GT2 etc, I need to search how many members starting with CI05 the PDS has.
Please tell me if there any command for this..I have found out a method by using "f CI05 first" and then using "f CI05 last" , noting down both the line numbers and getting the count!..
please reply if any of u have better methods ASAP. |
|
Back to top |
|
|
meetrb Beginner
Joined: 24 Nov 2003 Posts: 40 Topics: 15
|
Posted: Mon Apr 11, 2005 2:04 am Post subject: |
|
|
Hi,
You can do a "f all c105" and then taking the count which is displayed in the top right hand corner of your mainframe screen.
Regards,
Ranjit |
|
Back to top |
|
|
s_shivaraj Beginner
Joined: 21 Sep 2004 Posts: 140 Topics: 14 Location: Chennai, India
|
Posted: Mon Apr 11, 2005 2:36 am Post subject: Try this |
|
|
Ranjit,
Quote: | You can do a "f all c105" and then taking the count which is displayed in the top right hand corner of your mainframe screen.
|
The above will give you all the count, i.e even if the search text is present at the middle or End,, alaka27 needs only members starting with search string, so i think below one will help you.
Alaka27,
Just try this, when u list ur members using "m" before the PDS name, add ur search string in the end as below
Command - Enter "/" to select action
-----------------------------------------------------
m C901.LK4.DOCUMENT(CI05*)
Hope the above info help u. _________________ Cheers
Sivaraj S
'Technical Skill is the Master of complexity, while Creativity is the Master of Simplicity' |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Apr 11, 2005 5:55 am Post subject: |
|
|
If your shop has fileaid then you can try the following JCL. upon completion of the job look the sysprint and you will see "members-read="
Code: |
//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD DUMMY
//DD01 DD DSN=YOUR PDS,
// DISP=SHR
//SYSIN DD *
$$DD01 LIST MEMBERS=C105*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Wed May 04, 2005 3:02 pm Post subject: |
|
|
What about this solution ?
Code: | /* REXX */
/**********************************************************************
* Count the number of members matching a prefix. *
* *
* ARG library name and desired prefix. *
* *
* Assume that last character of the ARGed MEM is '*' *
**********************************************************************/
ARG LIB MEM .
WMEM = SUBSTR(MEM,1,LENGTH(MEM)-1)
LMEM = LENGTH(WMEM)
CNT = 0
SMEM = WMEM
LIB = "'"STRIP(LIB,"B","'")"'"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "LMINIT DATAID(LISTM) DATASET("LIB") ENQ(SHRW)"
ADDRESS ISPEXEC "LMOPEN DATAID(&LISTM) OPTION(OUTPUT)"
DO UNTIL LIST_RC = 8
ADDRESS ISPEXEC "LMMLIST DATAID(&LISTM) OPTION(LIST) MEMBER(WMEM)"
LIST_RC = RC
IF LIST_RC = 8 |,
SUBSTR(WMEM,1,LMEM) ?= S_MEM THEN
LEAVE
CNT = CNT + 1
END
ADDRESS ISPEXEC "LMFREE DATAID(&LISTM)"
ADDRESS ISPEXEC "LMCLOSE DATAID(&LISTM)"
SAY CNT
EXIT
|
O.
________
justin bieber fans |
|
Back to top |
|
|
|
|