Return and SetOn LR

209 Views


Difference between return and Seton LR (*INLR)

 *INLR closes all the files used in the program and RETURN is used to return the control back to the calling program.

What will happen if we r using seton lr after return or vice versa?
a. When we use SETON LR after Return, SETON LR will never be executed because before this operation could be performed, Return will send the control back to the called program.
b. When we use SETON LR before Return then the program will release all the used resources (like open files, variables, any API used, etc) and then return statement will be executed which will send the control back to the called program. I hope your question has been answered.

Reference from Go4as400

IBM Site - Return and Seton LR

Post Comments