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


Returned from the SYSCALL environment

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

When a syscall command completes, the environment can set four reserved variables:
RC
A numeric return code from the command execution.
Value Range
Meaning
0
The command finished successfully. If there is an error code for the requested function, it is returned in RETVAL and ERRNO.
>0
The command finished successfully, but a function-specific warning is indicated.
-3
The command environment has not been called. Probably the syscalls('ON') function did not end successfully, or the current address environment is not SYSCALL.
-20
The command was not recognized, or there was an improper number of parameters specified on the command.
-21,-22, ...
The first, second, ... parameter is in error. (The parameter is indicated by the second digit.)
<0
Other negative values might be returned by the REXX language processor. A negative value means that the command did not finish successfully.
RETVAL
A numeric return value from the callable service. This indicates the success or failure of the service. For most successful calls to services, RETVAL is set to zero; for unsuccessful calls, this value is -1.

However, there are some services (such as getgrgid and getgrnam) that return zero instead of -1 when the service fails. In addition, some services return a positive RETVAL to indicate success. For details about a specific service, see z/OS UNIX System Services Programming: Assembler Callable Services Reference.

ERRNO
A hexadecimal error number from the callable service. This variable is valid only if the return code (RC) is not negative and RETVAL is -1.
ERRNOJR
A hexadecimal reason code from the callable service. This variable is valid only if the return code (RC) is not negative and RETVAL is -1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014