To create a data space, issue the DSPSERV CREATE macro. MVS™ gives
you contiguous 31-bit virtual storage of the size you specify and
initializes the storage to hexadecimal zeros.
On the DSPSERV macro, you are required to specify:
- The name of the data space (NAME parameter).
To ask DSPSERV
to generate a data space name unique to the address space, use the
GENNAME parameter. DSPSERV will return the name it generates at the
location you specify on the OUTNAME parameter. See Choosing the name of a data space.
- A location where DSPSERV can return the STOKEN of the data space
(STOKEN parameter).
DSPSERV CREATE returns a STOKEN that you can
use to identify the data space to other DSPSERV services and to the
ALESERV and DIV macros.
Other information you might specify on the DSPSERV macro is:
- The maximum size of the data space and its initial size (BLOCKS
parameter). If you do not code BLOCKS, the data space size is determined
by defaults set by your installation. In this case, use the NUMBLKS
parameter to tell the system where to return the size of the data
space. See Specifying the size of a data space.
- A location where DSPSERV can return the address (either 0 or 4096)
of the first available block of the data space (ORIGIN parameter).
See Identifying the origin of a data space.
- The TTOKEN of the caller's job step task. If you want the data
space to exist after your task terminates, or to be made concurrently
available to any existing task in the job step as well as the creating
task, assign ownership of the data space to the job step task. Sharing data spaces among problem-state programs with PSW key 8-F describes a program that requests the TTOKEN of the
job step task and then assigns ownership of a data space to the job
step task. To request the TTOKEN of the job step task, issue the
TCBTOKEN macro using the TYPE=JOBSTEP option.