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 

Total Size of the members in a PDS

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


Joined: 17 Jan 2006
Posts: 26
Topics: 13

PostPosted: Fri Jan 11, 2008 4:11 am    Post subject: Total Size of the members in a PDS Reply with quote

Hi Everyone,

Can you help me to find out the total size (total number of lines) of all the members in a PDS?

Thanks,
Vishwa.
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Jan 11, 2008 4:17 am    Post subject: Reply with quote

Vishwa,

Check the below link. It has got many ways to find out the count.

http://www.mvsforums.com/helpboards/viewtopic.php?t=9134&highlight=number+lines+pds
Back to top
View user's profile Send private message Send e-mail
viswanathan
Beginner


Joined: 17 Jan 2006
Posts: 26
Topics: 13

PostPosted: Fri Jan 11, 2008 4:58 am    Post subject: Reply with quote

Thanks for the details vkphani!!

I made a mistake as I didnt give the full requirement at the top.

I need the solution for this situation:

There is a PDS AAA.PROD.SOURC which is the source library.
I need to find the total number of lines for all the members of a pattern inside this PDS. E.g. All members starting with CBM* in PDS AAA.PROD.SOURC.

Kindly help me in this regard.

Thanks,
Vishwa.
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Jan 11, 2008 5:36 am    Post subject: Reply with quote

Vishwa,

Copy members starting with CBM to a different dataset and follw the link given. There may be some other solution, let's wait for experts.
Back to top
View user's profile Send private message Send e-mail
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Jan 11, 2008 5:05 pm    Post subject: Reply with quote

You could trap the members within the PDS using these statements:

JUNK = OUTTRAP('MBR.')
"LISTD '" || DSN || "' MEMBERS"
JUNK = OUTTRAP('OFF')

DO I = 1 TO MBR.0
IF MBR.I = "--MEMBERS--" THEN LEAVE
END

If you do some checking within your MBR.I variable, you would be able to see what is returned from the LISTD command. One of the parts in the MBR.I variable is the name of each PDS member.

You could interrogate that PDS member to see if it starts with CBM. If it does, rebuild the file name using your PDS plus the member name.

FULL_NAME = PDS_NAME || "(" || MBR_NAME || ")"

Once the full name has been built, repeat the following for all CBM members:
1. Allocate the FULL_NAME file.
2. Read each record on the file and add 1 for each record read.
3. Free the file.
4. Add record count to a total record count.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Jan 11, 2008 9:38 pm    Post subject: Reply with quote

LMMLIST supports simple patterns like this too. if you think ISPF stats are reliable enough for your needs (remember, they are not always there and users can set them to any number they want to fairly easily), then just total the line counts from lmmlist. If ISPF stats aren't sufficient you can read each member using ISPF services. At least that way you don't haveto reallocate each member individually which is quite slow.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
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