Return_value

The Return_value parameter is common to many callable services, and indicates the success or failure of the service. If the callable service fails, it returns a -1 in the Return_value. For most successful calls to z/OS UNIX services, the return value is set to 0. However, some services, such as getgrgid (BPX1GGI, BPX4GGI) — Access the group database by ID and getgrnam (BPX1GGN, BPX4GGN) — Access the group database by name, return zeros instead of -1 when the service fails.

Some callable services, such as fork (BPX1FRK, BPX4FRK) — Create a new process, return a positive return value to indicate success. Other services, such as _exit (BPX1EXI, BPX4EXI) — End a process and bypass the cleanup, are unique in that they do not return when successful.

Some services do not have a return value, because under normal conditions they do not fail. System failures, however, may cause these services to fail, in which case, the process that issues the call ends abnormally. See getegid (BPX1GEG, BPX4GEG) — Get the effective group ID for an example.