For member count, yes; the GET_ALL function even when applied to a PDS returns 
# DESB's, 1 DESB per member, assuming just one PDS is allocated in a DD.  No 
way to get maximum directory blocks (which is unlimited for PDSE after all).  
So Kirk and Shmuel are both correct, the only and easiest way to get the 
directory block count is to read them to EOF of the directory.

I suspect that the JCL value in the SPACE parameter for directory entries is 
only used to set the initial value of the "TTR of next data block" value 
(DS1LSTAR?) in the DSCB of a newly-allocated PDS.  You can get the 
directory-blocks-per-track value from the DSCB but that is the same value for 
all files (emulated or otherwise) on 3390-format ECKD disks.  You could 
presumably use the blocks-per-track and next-data-block TTR values to calculate 
the maximum directory block count for a newly-allocated PDS, but no accurate 
way to calculate that for one that already has members in it and may have 
deleted member spaces (i.e., not compressed) even by reading all the directory 
blocks anyway to find the lowest starting TTR.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Seymour J Metz
Sent: Friday, October 11, 2019 2:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Best programming interface to get PDS max dir blocks?

OPEN and count is so easy that it's not worth while looking for alternatives 
unless you need to support PDSE. Is there a count option in DESREVE?
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Kirk Wolf <k...@dovetail.com>
Sent: Friday, October 11, 2019 11:40 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Best programming interface to get PDS max dir blocks?

For an existing PDS, what's the best way to get this?
Do you just have to open the directory and count?

Kirk Wolf
Dovetailed Technologies
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to