Previous Topic: #PUTSCR ParametersNext Topic: #PUTSCR Example


#PUTSCR Status Codes

By default, the #PUTSCR request is unconditional; a runtime I/O error will result in an abend of the issuing task. The issuing program can request return of control with the COND parameter to avoid an abend.

After completion of the #PUTSCR function, the value in register 15 indicates the outcome of the operation. The following is a list of the Register 15 values and the corresponding meaning:

X'00'

The request to add a new record has been serviced successfully.

X'04'

The request cannot be serviced; check for proper scratch-id specification (for example, a negative scratch ID is an improper specification) and for logical selection of options.

X'10'

The request to replace a scratch record has been serviced successfully.

X'14'

The request to add a new scratch record cannot be serviced because the scratch record ID specified by the SRID parameter already exists for the named scratch area and REPLACE=YES has not been specified.

X'1C'

The request cannot be serviced due to an I/O error during processing.

If an I/O error occurs while processing a #PUTSCR request, the system returns the address of the communications block to register 1. If no error occurs during processing, a user-defined register, assigned by the RTNSRID parameter, contains the SRID of the stored or replaced record.