Previous Topic: #GETSCR SyntaxNext Topic: #GETSCR Status Codes


#GETSCR Parameters

RECORD=

Specifies the location to which the system will return the scratch record.

record-scratch-data-location-pointer

A register that points to the variable storage area or the user-defined symbolic name of the area.

RECLEN=

Specifies the length of the area defined by the RECORD parameter and, if provided in the form of a user-defined variable field, assigns an area into which the system will place the actual length of the returned data.

scratch-data-max-length

Specifies the length of the data area associated with the requested scratch record. It is a register that contains the length or an absolute expression.

scratch-data-length

A symbolic user-defined field, specifies an area which is subdivided into two fullwords. The first fullword contains the length of the data area associated with the requested scratch record. The system returns the actual length of the requested scratch record to the second. If the record has been scratch-data-length will contain the length of the scratch record. If the record length is provided in register notation or as an absolute expression, an area composed of two fullwords, as defined by scratch-data-length, will be built dynamically at runtime in the sixth and seventh fullwords of the parameter list.

PLIST=

Specifies the location of the seven-fullword storage area in which the system will build the #GETSCR parameter list.

SYSPLIST

(Default); is the symbolic name of the storage area in which the system will build the #GETSCR parameter list.

parameter-list-pointer

A register that points to the area in which the system will build the #GETSCR parameter list or the symbolic name of that area.

SAID=

Specifies the 1- to 8-character ID of the scratch area associated with the record being retrieved.

scratch-area-id-pointer

A register that points to a field that contains the id, the symbolic name of a user-defined field that contains the ID, or the ID literal enclosed in quotation marks. If the SAID parameter is not specified, a null scratch area ID of 8 blanks is assumed.

LOC=

Specifies the scratch record to be retrieved.

NEXT

(Default); retrieves the next record in the scratch area.

FIRST

Retrieves the first record in the scratch area. (Records are always stored in ascending order by scratch record id.)

LAST

Retrieves the last record in the scratch area.

CURRENT

Retrieves the current record; that is, that record most recently referenced by another scratch function.

PRIOR

Retrieves the prior record in the scratch area. If currency in the scratch area has not been established, PRIOR is equivalent to LAST.

(SRID,scratch-record-id)

Retrieves the scratch record identified by scratch-record-id. Scratch-record-id is a register that points to the 4-byte scratch record id, the symbolic name of a user-defined field that contains the id, or an absolute expression of the id.

DISP=

Specifies whether the scratch record is to be kept after it is passed to the requesting program.

DELETE

(Default); deletes the record from the scratch area. If DELETE is specified and the record has been truncated, some data may be lost. To maintain currency following a DELETE request, the system saves the next and prior pointers of the deleted record.

KEEP

Keeps the record in the scratch area.

RTNSRID=

Specifies the location to which the system will return the scratch record ID of the retrieved record.

(1)

(Default); is the register into which the system will place the ID of the scratch record.

return-scratch-record-id

A register or the symbolic name of a fullword user-defined field to which the system will return the ID of the retrieved scratch record.

COND=

Specifies whether this #GETSCR is conditional and under what conditions 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 included in parentheses and separated by commas.

NAID

The scratch area ID cannot be found.

NRID

The scratch record ID cannot be found.

IOER

An I/O error occurs while processing the retrieval.

INVP

The parameter list built for the #GETSCR is invalid.

NAIDXIT=no-scratch-area-id-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSCR cannot be serviced because the scratch area ID cannot be found.

NRIDXIT=no-scratch-record-id-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSCR cannot be serviced because the scratch area record ID cannot be found.

IOERXIT=i/o-error-label

Specifies the symbolic name of the routine to which control should be returned if the #GETSCR cannot be serviced because of an I/O error.

INVPXIT=invalid-parameter-list-label

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

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.