SETL: Set library

SETL specifies how a specified symbol will be handled during automatic library call. SETL is not performed until the workmod is bound, regardless of where the call appears in the dialog.

The syntax of the SETL call is:

FUNC=SETL
Specifies that you are requesting an automatic library call option for a symbol. The particular library call option is set on the LIBOPT parameter.
VERSION=1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Specifies the version of the parameter list to be used. The default value is VERSION=1.
RETCODE=retcode — RX-type address or register (2-12)
Specifies the location of a fullword integer that is to receive the return code returned by the binder.
RSNCODE=rsncode — RX-type address or register (2-12)
Specifies the location of a 4-byte hexadecimal string that is to receive the reason code returned by the binder.
WORKMOD=workmod — RX-type address or register (2-12)
Specifies the location of an 8-byte area that contains the workmod token for this request.
SYMBOL=symbol — RX-type address or register (2-12)
Specifies the location of a 32K–1 varying character string that contains the name of the symbol for which a library call option is being set. This paramether is optional with LIBOPT=CALL. If omitted, the service call is interpreted as a request to allow any accessible symbol in the CALLIB or PATHNAME to be used during final symbol resolution.
LIBOPT={CALL | NOCALL | EXCLUDE}
Requests whether the automatic library call option for a symbol be call, nocall, or exclusive nocall. The possible arguments are as follows:
CALL
Specifies a search of the library specified by CALLIB to resolve the reference. If the symbol cannot be resolved from this library, no attempt to resolve it from the system autocall library is made.

CALL is the default.

NOCALL
Specifies that no attempt is made to resolve the reference via autocall during the current dialog.
EXCLUDE
Specifies that no attempt is made to resolve the reference via autocall during the current dialog or during any subsequent binder processing. This can be overridden in subsequent processing runs by resetting the LIBOPT value to CALL on a SETL call.
The argument for LIBOPT can be abbreviated as C, N, or E.
CALLIB=ddname — RX-type address or register (2-12)
Specifies the location of an 8-byte varying character string that contains the ddname of the library to be used during autocall. CALLIB is mutually exclusive with PATHNAME. This keyword is only recognized if LIBOPT=CALL is coded or defaulted.
PATHNAME=pathname — RX-type address or register (2-12)
Specifies the location of a 1023-byte varying character string that contains the absolute or relative path name of a z/OS UNIX System Services file. The path name must begin with "/" (absolute path) or "./" (relative path) and is limited to a maximum of 1023 characters. Note that PATHNAME must resolve to the file that is included. PATHNAME is mutually exclusive with CALLIB. This keyword is only recognized if LIBOPT=CALL is coded or defaulted.

Processing notes

When multiple conflicting SETL requests are made, the last issued is used. If a SETL CALL request is made that does not list a symbol, followed by NOCALL or EXCLUDE requests for the same CALLIB or PATHNAME, other symbols that have not been restricted can still be used from that library or path.

A SETL request is valid only when the processing intent is BIND.

Return and reason codes

The common binder API reason codes are shown in Table 1.

Return Code Reason Code Explanation
00 00000000 Normal completion.
08 83000711 This request replaced a previous SETLIB request for the same symbol.
12 83000101 The LIBOPT and CALLIB parameters are inconsistent. Either LIBOPT=C and CALLIB was omitted, or LIBOPT=N or E and CALLIB was present. Request rejected.
12 83000104 The SETL function is invalid against a workmod specified with INTENT=ACCESS. Request rejected.

Parameter list

If your program does not use the IEWBIND macro, place the address of the SETL parameter list in general purpose register 1.

Table 1. SETL parameter list
       
PARMLIST DS 0F  
  DC A(SETL) Function code
  DC A(RETCODE) Return code
  DC A(RSNCODE) Reason code
  DC A(WORKMOD) Workmod token
  DC A(SYMBOL) Symbol/Section name
  DC A(LIBOPT) Library option
  DC A(DDNAME+X'80000000') Library ddname or pathname
SETL DC H'21' SETL function code
  DC H'version' Interface version number
XLIBOPT DC CL1'C' Library option

  'C' = Call
  'N' = Nocall
  'E' = Exclude