z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using external functions and subroutines

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

You can call external functions and subroutines from a REXX program that resides in the z/OS® UNIX file system. The search path for an external routine is similar to that used for a REXX program that is invoked from a z/OS shell or from a program. If only the filename is used on the call to the function or subroutine, the PATH environment variable is used to locate it; otherwise, the function name determines the search. For an executable module, the link pack area (LPA), link list, and STEPLIB can also be searched. The default z/OS environment searches for executable modules first. See Customizing the z/OS UNIX REXX environment.

The search order for modules and execs that are invoked as functions or subroutines is controlled by the FUNCSOFL flag in the REXX parameter module. For a description of that flag, see z/OS TSO/E REXX Reference.

The following rule must be observed in naming and calling an external function or subroutine:
  • If the name contains special characters or lowercase characters, you must enclose it in quotes— for example:
    ans='myfunc'(p1,p2)
    If the name is not quoted, REXX folds the name to uppercase. The function call then fails, because the file is not found.
Executable external functions or subroutines that are written in a language other than interpreted REXX and located in the z/OS UNIX file system are not supported.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014