Page 1 of 2

Free space

PostPosted: Tue Aug 10, 2010 10:42 pm
by vegafacundodaniel
Hello,
A have a question please. How can I know the free space on mainframe ?

Thanks !
Regards

Re: Free space

PostPosted: Tue Aug 10, 2010 11:02 pm
by Robert Sample
Your question is not clear. By free space do you mean the unused space on a disk pack (the usual meaning on a mainframe)? Or do you mean unused memory on the processor? Or do you mean something else altogether?

Re: Free space

PostPosted: Tue Aug 10, 2010 11:13 pm
by vegafacundodaniel
I mean unused space on a disk pack.

I'd want to know too.... If I have the dataset XXXX.AAAAA.BBBBB, can I see the unused space on XXXX or I must view the unused space on the disk where the dataset is ?

Thanks in advance !!!

Re: Free space

PostPosted: Tue Aug 10, 2010 11:31 pm
by Robert Sample
I think there is a terminology issue here. On the mainframe, "free space" refers to unused space on a disk pack. So if a 3390 mod 3 with 3,335 cylinders on it has 17 data sets that total 2,235 cylinders of allocated space then the free space would be 1,100 cylinders -- for that disk pack. Another disk pack would have a totally different free space number, of course. This information is best obtained from your site storage management group, as the facilities used to find this are often restricted and not available to typical programmers.

I think you are interested in unused space in a data set -- if a single data set is allocated at 100 cylinders, but only 15 of them have data written to them, then the data set has 85 unused cylinders. This can be determined by using ISPF option 3.2 or 3.4 to get information about the data set.

Re: Free space

PostPosted: Tue Aug 10, 2010 11:44 pm
by dick scherrer
Hello,

If I have the dataset XXXX.AAAAA.BBBBB, can I see the unused space on XXXX. . .

XXXX is a high level qualifier (hlq). There is no free space associated with an hlq. There might be free space for datasets beginning with that hlq. There is most likely free space on the volumes containing datasets with that hlq.

Re: Free space

PostPosted: Tue Aug 10, 2010 11:57 pm
by vegafacundodaniel
Thanks to all !!!

So if I want to allocate a dataset, how can I know the volumes that contains free spaces ?

Re: Free space

PostPosted: Wed Aug 11, 2010 12:03 am
by Robert Sample
Most sites are running SMS these days. With SMS, you provide your estimated data set size and SMS finds a disk pack to put it on, in a storage pool that matches the requirements set at your site (which may be by high level qualifier, allocation size, type of file, etc).

In short, you rarely have to know which disk pack to put a data set on these days. If there is doubt in your mind about this, the only way to resolve it will be to talk to your site storage management group who can tell you the policies in effect at your site. Every site has different policies, so something someone tells you to do based on their site most likely will not work at your site.

Re: Free space

PostPosted: Wed Aug 11, 2010 4:58 am
by steve-myers
What I know about this is a little dated and is mostly useful to an Assembler programmer, but I'll have a go at it.

Free space on a single volume can be obtained by the LSPACE macro. In 2005 I wrote a line mode TSO command that in its heart is a shell for the LSPACE macro.
                           Largest
                           Extent   Free   Free  Free  Free  Frag Mount
Unit Type Volser  Status  Cyls:trk  Cyls Extents DSCBs  VIR Index Status
0A80 3390 Z6RES1 S          159:11   516     48   1119  300   244 PRIVATE
This program will require quite a lot of attention to support extended attribute type volumes.

As Mr. Sample indicates, this knowledge is not very useful these days since most allocation is done using SMS.

Free space within a data set is more complex. Unused space at the end of a data set can be calculated by obtaining the Format 1 DSCB and any Format 3 DSCBs for the data set, using data in them to determine the allocated space for the data set, and then using the contents of DS1LSTAR to determine the used space. Subtract used space from allocated space to get unused space. This is from a TSO command originally written in the early 1980s, and rewritten in 1991.
SYS1.MACLIB
--UNIT---DEVICE---VOLUME--RECFM--LRECL--BLKSIZE--DSORG--ALLOCATED---USED
  0A80   3390     Z6RES1  FB        80    6160    PO       2745     2737
--ALLOCATED--LAST USED---EXPIRES--ALTERED
   04/03/01  08/10/10     ------    YES
As with the LSPACE command, this program will require attention for extended attribute volumes.

VSAM is a more complex problem since unused space is distributed through the data set. The LISTCAT command in IDCAMS will show the high allocated and high used RBA for a VSAM data set, but this information may not be very reliable, and it gives no indication of available space within the data set.

Re: Free space

PostPosted: Wed Aug 11, 2010 9:52 am
by NicC
The simplest way to find the free, i.e. unallocated, space on a volume is to use 3.4. Just enter the volser that you are interested in in the Volume Serial field and enter the V primary command and press enter.

Re: Free space

PostPosted: Wed Aug 11, 2010 5:34 pm
by enrico-sorichetti
How can I know the free space on mainframe

well that' kind of complicate, all depends from the <on> meaning

for the inside...
the fastest way would be to fill the mainframe with water and
convert the liters to cubic centimeters/inches

for the over,above, on the top ...
all depends the surface of the MF casing and the distance from the ceiling

P:S.I just could not resist :D