Skip to main content

#TERM

The #TERM macro is used to perform cleanup for the #SETUP macro and to return control to the MVS security product caller. The #TERM macro accepts one parameter: RC.

RC is used to indicate the exit return code that will be passed back to the original caller. It should be set to the highest return code value that was returned from any of the #XITRTN exit routines.

#TERM macro usage examples would look as follows:

         #TERM RC=(R5)
END      #TERM RC=8

The #TERM exit establishes register equates and a DSECT mapping for temporary storage obtained in the #SETUP macro. The following labels are used by the temporary storage mapping:

  • TEMPSTOR

  • SAVEAREA

  • R1VAL

  • LASTRC

  • HIGHRC

External to the scope of the macro calls, LASTRC can be used to determine the return code value returned by the last successfully executed #XITRTN exit routine. HIGHRC can be used to determine the highest return code that has been returned from any prior execution of a #XITRTN exit routine.