Alas, MVS doesn't keep "size of members". The only way of finding *this* is
to read the member. What you can find is the "size of the load module" -
ie, the amount of memory required when it is loaded. (The Binder/LinkEditor
can add stuff to a load module member which won't change the size of the
load module, but will change the size of the member.) To do this you will
need to read the PDS directory (not PDSE).
Allocate the library with LRECL=256, BLKSIZE=256, RECFM=U. This is the
magic password that means when you read from the library you don't read the
members - you read the 256 byte directory blocks.
Each directory block has a byte length of data used in the block (12 to
255), followed by a series of member entries - the total size of which is
the length in the first byte
each member entry has the format:
CL8 - member's name, a name of x'FFFFFFFF' is used as the last name in the
directory
XL3 - TTR offset to where the member starts in the library
XL1 - flags built up from
bits 0-4, length of data following this byte in 2-byte units - giving
a maximum length of this member's directory entry of 8+4+(31*2) = 74 bytes
bit 5 - on if this member is an alias. The 8 byte name of the real
member follows this byte (and the length bits should be 00100, ie 4 x 2-byte
units)
bits 6-7, the number of note entries following this byte. These note
entries are each 4 byte TTRs to parts of the member. A load module will
always have one and usually two. (The first points to the start of the
actual load module within the member (skipping the CSECT etc stuff at the
start) and the second points to the start of a table of relocation stuff
following the member (re-location stuff is used to add the base address of
the module into A- and V-constant addresses within the load module. This
table contains the position of these addresses.) (These are 4-bytes long
because they can contain a flag saying that the TTR points to a note list
block - a block of TTRs which point into the load module) (The format of
all these TTRs is fixed so that when IEBCOPY copies the member it will
re-calculate all the TTR values at the destination.)
n*XL4 - the note TTRs.
FL4 - the length of the load module - what you're looking for.
<other stuff>
DISCLAIMER. This was from memory. Verify before committing to use.
Alternative option. Use IEHLIST (also works with PDSEs) and extract the
load module length from the printed output.
James Campbell
Telstra Corporation
jcam...@vitgsysa.telecom.com.au
To expand:
I am using LISDSI to return info about datasets (eg volume
serial) but now want to get back the size of individul members for
comparison.
This SIZE field is available through ISPF 3.1 and in the pds directory.
What I would like to find out is whether anyone knows a utility or some
rexx technique to read individual pds directory entries routine to
return the size of selected pds members that I can include in a rexx.
Any ideas ? - or does any one know of an ISPF or MVS newsgroup which may
be more relevant for this sort of discussion?
Thanks in anticipation.