z/OS MVS Programming: Extended Addressability Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Extending the current size of a data space

z/OS MVS Programming: Extended Addressability Guide
SA23-1394-00

When you create a data space and specify an initial size smaller than the maximum size, you can use DSPSERV EXTEND to increase the current size as your program uses more storage in the data space. The BLOCKS parameter specifies the amount of storage you want to add to the current size of the data space.

The system increases the data space by the amount you specify, unless that amount would cause the system to exceed one of the following:
  • The data space maximum size, as specified by the BLOCKS parameter on DSPSERV CREATE when the data space was created
  • The installation limit for the combined total of data space and hiperspace storage with storage key 8 -F per address space. These limits are either the system default or are set in the installation exit IEFUSI.
If one of those limits would be exceeded, the VAR parameter tells the system how to satisfy the EXTEND request.
  • VAR=YES (the variable request) tells the system to extend the data space as much as possible, without exceeding the limits set by the data space maximum size or the installation limits. In other words, the system extends the data space to one of the following sizes, depending on which is smaller:
    • The maximum size specified on the BLOCKS parameter
    • The largest size that would still keep the combined total of data space and hiperspace storage within the installation limit.
  • VAR=NO (the default) tells the system to:
    • Abend the caller, if the extended size would exceed the maximum size
    • Reject the request, if the data space has storage key 8 - F and the request would exceed the installation limits
Consider the data space in Figure 1, where the current (and initial) size is 20,000 bytes and the maximum size is 100,000 bytes. To increase the current size to 50,000 bytes, adding 30,000 bytes to the current size, the creating program would code the following:
          DSPSERV EXTEND,STOKEN=DSSTOK,BLOCKS=DSBLCKS
          .
DSDELTA EQU  30000                   30000 BYTES OF SPACE
DSBLCKS DC   A((DSDELTA+4095)/4096)  NUMBER OF BLOCKS ADDED TO DATA SPACE
DSSTOK  DS  CL8                      STOKEN RETURNED FROM DSPSERV CREATE

The storage the program can use would then be 50,000 bytes, as shown in Figure 1.

Figure 1. Example of Extending the Current Size of a Data Space

If you use VAR=YES when you issue the EXTEND request, use NUMBLKS to find out the size by which the system extended the data space.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014