Start/End a Module



Apart from the use of GOBACK and PROCEDURE DIVISION USING in COBOL, and the correct use of PROC and END statements in PLI, the High Level Programmer does not have to give much thought to the responsibilities required to ensure that a program complies with Operating System requirements.

The situation in Assembler is completely different so opposite are links to three methods of starting and ending a program or module.

Program / Module initialisation and termination methods.



Traditional method using IBM Macros

Begin and end using IBM's SAVE and RETURN macros.

Traditional method without IBM Macros

Begin and end by hard coding instructions that would have been generated by the equivalent SAVE and RETURN macros.

Modern method - using a linkage-stack state entry

Begin and end using the BAKR and PR instructions.

Other options

The use of LE compliant macros are an option but not covered here as they are illustrated elsewhere in these pages. The use of in-house written macros is also not discussed as they would be installation specific.



Copyright © Legac-e Education 2015-