MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ISPF command

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
alaka27
Beginner


Joined: 11 Apr 2005
Posts: 1
Topics: 1
Location: bangalore

PostPosted: Mon Apr 11, 2005 1:06 am    Post subject: ISPF command Reply with quote

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
View user's profile Send private message Yahoo Messenger
meetrb
Beginner


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Mon Apr 11, 2005 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message
s_shivaraj
Beginner


Joined: 21 Sep 2004
Posts: 140
Topics: 14
Location: Chennai, India

PostPosted: Mon Apr 11, 2005 2:36 am    Post subject: Try this Reply with quote

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
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Apr 11, 2005 5:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Wed May 04, 2005 3:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group