Previous Topic: #GETSTG SyntaxNext Topic: #GETSTG Status Codes


#GETSTG Parameters

TYPE=

Required for all requests for storage, specifies three subparameters. Specified subparameters must be enclosed in parentheses.

USER/SHARED

Specifies whether access to the storage is to be restricted to the issuing task or is to be available to all tasks in the system.

USER

Specifies that access to the storage area is to be restricted to the issuing task or, if KEEP is specified, to subsequent tasks executing on the same terminal.

Note: During system generation, a program defined with the NOPROTECT option can access any storage area in the system, including an area associated exclusively with another task. Thus, the USER attribute may not protect the storage area being acquired. However, storage areas can be protected on a system-wide or program-by-program basis during system generation and by the modes specified when storage is allocated.

SHARED

Specifies that any task in the DC/UCF system can access and modify the acquired storage. Each task must establish addressability to the storage area by explicitly issuing a #GETSTG request.

LONG/SHORT

Specifies whether the system should allocate the storage from the bottom or the top of the storage pool.

LONG

Specifies that storage, used long-term, is allocated from the bottom of the storage pool.

SHORT

Specifies that storage, used short-term, is allocated from the top of the storage pool. An incorrect LONG/SHORT specification will not affect normal program execution; however, it may affect the overall performance of the DC/UCF system.

Note: For more information about the use of the LONG/SHORT option, see the CA IDMS Navigational DML Programming Guide.

KEEP

Optionally specifies whether the storage area will be used by subsequent tasks executing on the same logical terminal. When KEEP is specified, the storage area can be accessed by subsequent tasks; otherwise the storage area cannot be accessed by subsequent tasks.

Note: For more information about the KEEP parameter, see the CA IDMS Navigational DML Programming Guide.

PLIST=

Specifies whether the six-fullword #GETSTG parameter list will be built inline or in a variable storage area and, if built in a variable storage area, identifies the location of that area.

SYSPLIST

(Default); builds the list in a variable storage area identified by the symbolic name SYSPLIST.

*

Builds the list inline. The generated parameter list will be reentrant; that is, no generated code will modify it. If PLIST=* is specified, other parameters of the #GETSTG statement cannot be identified with register notation.

parameter-list

Builds the list in a variable storage area associated with the task. Parameter-list is a register which points to the area or the symbolic name of that area.

LEN=

Specifies the size, in bytes, of a new storage area.

storage-length

A register or the symbolic name of a user-defined halfword or fullword field that contains the number of bytes, or an absolute expression.

Note: If the parameter list is being generated inline (PLIST=*), the LEN parameter must specify the symbolic name of a fullword field or an absolute expression; register notation and a halfword variable field name are invalid.

INIT=

Specifies an initial value for a new storage area.

initial-value

An absolute expression of the initial value. Each byte of the acquired storage area is initialized to the specified value.

ADDR=

Specifies the address of the acquired or previously acquired storage:

(1)

(Default); is a register or the symbolic name of a fullword user-defined field to which the system will return the address of the acquired storage.

storage-address

A register or the symbolic name of a fullword user-defined field to which the system returns the address of the acquired storage.

STGID=

Specifies the 4-character ID associated with the storage area. The STGID parameter must be specified with #GETSTG requests for previously allocated storage areas or areas to be reallocated.

storage-id

A register that contains the id, the symbolic name of a 4-byte user-defined field which is aligned on a fullword boundary and contains the ID, or the ID literal enclosed in single quotation marks.

Note: If the parameter list is being generated inline, the STGID parameter must specify the symbolic name of a variable field or a literal enclosed in quotation marks; register notation is invalid. When using the STGID option to request the address of an existing storage area, the #GETSTG statement must specify the same USER/SHARED option as the original #GETSTG request issued by the task to acquire the area.

Note: All storage ids owned by a task must be unique. While more than one variable storage area with the same storage ID can exist (for example, one shared and the other user) only one such area can be owned by a task at a time.

LOC=

Indicates where the system allocates storage.

ANY

(Default); indicates that storage can be allocated anywhere in the region.

BELOW

Requests that the system allocate storage below the 16-megabyte line.

XA

Requests that the system allocate storage above the 16-megabyte line. This option is ignored if the system has no XA storage pools defined or if it is not XA-enabled.

COND=

Specifies whether this #GETSTG statement is conditional and under what condition control should be returned to the issuing program:

NO

(Default); specifies that the request is not conditional.

ALL

Specifies that the request is conditional. Control is returned if the request cannot be serviced for any of the reasons listed below.

condition

Specifies conditions under which the system returns control to the issuing task. Multiple conditions must be enclosed in parentheses and separated by commas.

NOST

Available space in the storage pool is insufficient to satisfy the request. Do not wait for additional storage to become available.

INVP

The parameter list built for the #GETSTG is invalid.

DEAD

The available space in the storage pool is insufficient to satisfy the request and if to wait would cause a deadlock

XAST

Allocated storage above the 16-megabyte line cannot be addressed by the 24-bit task.

NOSTXIT=insufficient-storage-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSTG cannot be serviced because the available storage is insufficient to satisfy the request.

INVPXIT=invalid-parameter-list-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSTG cannot be serviced because of an invalid parameter in the parameter list.

DEADXIT=deadlock-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSTG cannot be serviced because the available storage is insufficient to satisfy the request, and if to wait would cause a deadlock.

NWSTXIT=new-storage-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSTG request names a STGID that does not exist in the system (TYPE=SHARED) or in the task (TYPE=USER).

XASTXIT=extended-addressing-storage-label

Specifies the symbolic name of the routine to which control is returned if the allocated storage above the 16-megabyte line cannot be addressed by the 24-bit task.

ERROR=error-label

Specifies the symbolic name of the routine to which control should be returned if a condition specified in the COND parameter occurs for which no other exit routine was coded.