Parameters
Register 1 contains the address of a parameter list, which consists of a list of addresses. Each address in the parameter list points to a parameter. The high-order bit of the last address in the parameter list must be set to 1 to indicate the end of the parameter list. For more information about passing parameters, see Parameter lists for TSO/E REXX routines.
Table 1 describes the parameters for the data stack routine.
| Parameter | Number of bytes | Description |
|---|---|---|
| Parameter 1 | 8 | The function to be performed. The function name
is left justified, in uppercase, and padded to the right with blanks.
The valid functions are: Functions supported for the data stack routine describes the functions in more detail. |
| Parameter 2 | 4 | The address of a fullword in storage that points
to a data stack element, a parameter string, or a fullword of zeros.
The use of this parameter depends on the function requested. If
the function is DROPBUF, the parameter points to a character string
containing the number of the data stack buffer from which to start
deleting data stack elements. If the function is a function that places an element on the data stack (for example, PUSH), the address points to a string of bytes that the caller wants to place on the data stack. There are no restrictions on the string. The string can contain any combination of hexadecimal characters. For PULL and PULLEXTR, this parameter is not used on input. On output, it specifies the address of the string that was returned. For PULL, the string was pulled from the data stack. For PULLEXTR, the string was read from the input stream, for example, the terminal or the SYSTSIN file. It is suggested that you do not change the original string and that you copy the original string into your own dynamic storage. In addition, the original string will no longer be valid when another data stack operation is performed. |
| Parameter 3 | 4 | The length of the string pointed to by the address in parameter 2. |
| Parameter 4 | 4 | A fullword binary number into which the result from the call is stored. The value is the result of the function performed and is valid only when the return code from the routine is 0. For more information about the results that can be returned in parameter 4, see the descriptions of the supported functions below and the individual descriptions of the data stack commands in this book. |
| Parameter 5 | 4 | The address of the environment block that represents
the environment in which you want the data stack replaceable routine
to run. This parameter is optional. If you specify a non-zero value for the environment block address parameter, the data stack routine uses the value you specify and ignores register 0. However, the routine does not check whether the address is valid. Therefore, you must ensure the address you specify is correct or unpredictable results can occur. For more information, see Using the environment block address. |
| Parameter 6 | 4 | A 4-byte field that the data stack replaceable
routine uses to return the return code. The return code parameter is optional. If you use this parameter, the data stack routine returns the return code in the parameter and also in register 15. Otherwise, the routine uses register 15 only. If the parameter list is invalid, the return code is returned in register 15 only. Return codes describes the return codes. If you do not want to use the return code parameter, you can end the parameter list at a preceding parameter. Set the high-order bit on in the preceding parameter's address. For more information about parameter lists, see Parameter lists for TSO/E REXX routines. |