The CLIST built-in function exit receives the standard exit parameter
list. However, no data is passed for the command buffer (parameter
entry 1). That is, the key field has a value of X'00', the
length field has a value of X'04', and the data field has
a value of X'00'. For a description of the standard exit
parameter list, see TSO/E standard exit parameter list.
Figure 1 shows the exit-dependent data
that the exit receives beginning at offset +36 in the parameter list.
Each parameter entry is described following the figure.
Figure 1. Exit-dependent
data for the CLIST built-in function exit
- Name (Parameter Entry 10)
- This parameter entry describes the name of the installation-written
built-in function.
- Argument (Parameter Entry 11)
- This parameter entry describes the argument of the built-in function.
The argument can be a variable, expression, or character string.
- Result (Parameter Entry 12)
- This parameter describes a 256-byte answer area that is passed
to the exit. If your exit successfully evaluates a built-in function,
you must place the result into this answer area and update the length
field to reflect the length of the result. When the exit returns
control, CLIST processing replaces the built-in function with the
result.
However, if the result is longer than 256 bytes, your exit
must use an alternate buffer to return the result.
- Alternate Buffer Length (Parameter Entry 13)
- This parameter entry describes the length of an alternate buffer
used to return the result of evaluating a built-in function. When
the result is longer than 256 bytes, and cannot be returned to CLIST
processing in the 256-byte answer area, your exit must create an alternate
buffer. To pass the result to CLIST processing using an alternate
buffer, follow these steps:
- Obtain the storage for the alternate buffer in subpool 0
- Place the result into the alternate buffer
- Update parameter entry 12 as follows:
- Update the length field to be the actual length of the result
that is being passed to CLIST processing
- Set the data field to the address of the alternate buffer
- Update parameter entry 13 as follows:
- Set the key field to X'01' to indicate that the data
field contains the actual data for the parameter entry
- Set the data field to the number of bytes of storage obtained
for the alternate buffer
- Set an exit return code of 4 to indicate to CLIST processing that
your exit obtained storage for an alternate buffer. CLIST processing
frees the storage obtained for the buffer after it has processed the
answer returned by the exit.