Sunday, 14 July 2013

When program1 calls program2 for the first time program2 executes the *INZSR subroutine.Program2 uses the RETRN operation to return to program1.However when program1 call again program2 this time is the *INZSR subroutine executed?


If you specify RETRN in called program, the *INZSR will not execute again.
Reason: The INZSR is used to "initialise" the environment for the execution of your program by setting/resetting variables, etc, however many times it is called. If only return is used, all the values are held in memory anyway, so you don't have to initialize everything all over again. If LR is on at the end, INZSR will be executed again.

No comments:

Post a Comment