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


Argument list

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

Table 1 shows the format of the parsed argument list the function or subroutine code receives at offset +16 (decimal) in the external function parameter list. The figure is an example of three arguments. TSO/E provides a mapping macro IRXARGTB for the argument list. The mapping macro is in SYS1.MACLIB.

Table 1. Format of the argument list — three arguments
Offset (dec) Number of bytes Field name Description
0 4 ARGSTRING_PTR Address of argument 1
4 4 ARGSTRING_LENGTH Length of argument 1
8 4 ARGSTRING_PTR Address of argument 2
12 4 ARGSTRING_LENGTH Length of argument 2
16 4 ARGSTRING_PTR Address of argument 3
20 4 ARGSTRING_LENGTH Length of argument 3
24 8 X'FFFFFFFFFFFFFFFF'

In the argument list, each argument consists of the address of the argument and its length. The argument list is terminated by X'FFFFFFFFFFFFFFFF'.

If an argument is omitted, the address of the argument is 0. If a null string is passed as an argument to a function, the address of the argument is nonzero, but the length of the argument is 0. For example, suppose you invoked an assembler function called "MYFUNC" using this invocation:
Z = MYFUNC(,'','ABC')
The argument list would contain the addresses and lengths of the three arguments followed by X'FFFFFFFFFFFFFFFF':
  • The first argument is an omitted argument, also know as a dummy argument, so it is indicated by an address of 0.
  • The second argument is a null string, so it is indicated by a nonzero address and a length of 0.
  • The third argument is string 'ABC', so it is indicated by a pointer to the characters 'ABC' and a length of 3.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014