On Wed, 16 Nov 2005 10:23:33 -0500, Charles Mills wrote:

>I know that determining the size of and/or requested size information for a
>conventional non-necessarily-extended-format MVS dataset is an imperfect
>science. What is the best option (other than reading it start to finish!)?
>What are the alternatives?
>
>- Using OBTAIN/CAMLST to read the DSCBs. This gives both SPACE= information
>and actual extent sizes. Any comments?

OBTAIN/CAMLST will provide what you need and it is not terribly difficult
to do (or to understand, really).  Assembler is actually the easiest method
(for me, anyway) but you ought to be able to do what you want in Systems/C
or other C variants (if you are alergic to assembler).

What you will get (if you do the processing correctly) is the sum of the
extent lists, which describe the data set's geometry; you won't get the
SPACE= allocation from the original file -- that's gone.  From the
geometry, you can measure the size of the data set (just like room
dimensions).

I've done exactly this type of processing (a long time ago in a data center
far away) to provide for dynamic SORTWK space calculated - correctly - from
the size of the input file(s).  It doesn't take long to code and doesn't
take long at all to run and it works.  I didn't take it with me when I left
there (or if I did it isn't readable anymore -- "three moves is as good as
a fire" as an old friend used to say).

You don't have to read the file end-to-end to calculate the space.  Toss in
DS1LSTAR (and the extension field added by z/OS 1.7 for Large Data Set
support, by the way) and you have the used space to within a block or
less.


>- I assume that RDJFCB for a not-yet-opened dataset will give SPACE=
>information only as coded in the DD statement (or SVC 99) which would be
>atypical and/or misleading for input datasets. Is that correct? The OPEN
>processing documentation describes DFSMS as merging the data from the DSCBs
>into the JFCB. How is that information available to an application program?
>In some way during an OPEN exit? By using RDJFCB after the dataset has been
>opened? Or ...?

You might be able to use SWAREQ services to pull the SPACE= from the
allocating DD statement (with DISP=NEW or DISP=MOD) but I'd trust the
geometry myself (and I have in the past).

--
Tom Schmidt
Madison, WI

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to