HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Ending program execution

HLASM Programmer's Guide
SC26-4941-06

You indicate completion of an assembler language source program by using the RETURN system macro instruction to pass control from the terminating program to the program that initiated it. The initiating program might be the operating system or, if a subprogram issued the RETURN, the program that called the subprogram.

In addition to indicating program completion and restoring register contents, the RETURN macro instruction can also pass a return code—a condition indicator that can be used by the program receiving control.

If the return is to the operating system, the return code is compared against the condition stated in the IF and ON job control statements.

If return is to another program, the return code is available in general register 15, and can be used as required. Your program should restore register 13 before issuing the RETURN macro instruction.

The RETURN system macro instruction is discussed in detail in the applicable application programming Macro Reference document.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014