z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Parameters

z/OS TSO/E REXX Reference
SA32-0972-00

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 I/O routine.

Table 1. Input parameters for the I/O replaceable 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:
  • INIT
  • OPENR
  • OPENW
  • OPENX
  • READ
  • READX
  • WRITE
  • TERM
  • CLOSE

Functions supported for the I/O routine describes the functions in more detail.

Parameter 2 4 Specifies the address of the record read, the record to be written, or the data set information block, which is an area in storage that contains information about the file (see Data set information block).
Parameter 3 4 Specifies the length of the data in the buffer pointed to by parameter 2. On output for an open request, parameter 3 contains the length of the data set information block. Buffer and buffer length parameters describes the buffer and buffer length in more detail.
Parameter 4 8 An eight character string that contains the name of a preallocated input or output DD. The DD must be either a sequential data set or a single member of a PDS. If a member of a PDS is to be used, the DD must be specifically allocated to the member of the PDS.

If the input or output file is not sequential, the I/O routine returns a return code of 20.

Parameter 5 4 For a read operation, this parameter is used on output and specifies the absolute record number of the last logical record read. For a write to a DD that is opened for update, it can be used to provide a record number to verify the number of the record to be updated. Verification of the record number can be bypassed by specifying a 0.

This parameter is not used for the INIT, OPENR, OPENW, OPENX, TERM, or CLOSE functions. See Line number parameter for more information.

Parameter 6 4 The address of the environment block that represents the environment in which you want the I/O replaceable routine to run. This parameter is optional.

If you specify a non-zero value for the environment block address parameter, the I/O 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 7 4 A 4-byte field that the I/O replaceable routine uses to return the return code.

The return code parameter is optional. If you use this parameter, the I/O 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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014