When you create a data space and specify a maximum size larger
than the initial 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 specified at the creation of the data space
- Reject the request, if the data space has storage key 8 - F and
the request would exceed the installation limits.
If you use VAR=YES when you issue the EXTEND request, use the NUMBLKS
parameter to find out the size by which the system extended the data
space.
Figure 1 is an example of using the EXTEND request,
where the current (and initial) size is 20,000 bytes and the maximum
size is 100,000 bytes. If you want to increase the current size to
50,000 bytes, adding 30,000 blocks to the current size, you could
code the following:
DSPSERV EXTEND,STOKEN=DSSTOK,BLOCKS=DSPDELTA
.
DSPDELTA DC A((30000+4095)/4096) DATA SPACE ADDITIONAL SIZE
DSSTOK DS CL8 DATA SPACE STOKEN
The program can now use 50,000 bytes in the 100,000-byte data space,
as shown in
Figure 1:
Figure 1. Example of
Extending the Current Size of a Data Space
Because the example did not include the VAR parameter, the system
uses the default, VAR=NO.