Reputation: 787
*inlr (last record indicator) switched on at the end of the rpgle program. What is the main reason for switching on last record indicator. What will happen if this indicator is not switched on.
Upvotes: 3
Views: 1803
Reputation: 3674
You don't always have to switch that indicator on. Sometimes you can just code RETURN to end the program.
*inlr is part of the "RPG Cycle" which is used by cycle modules. If you don't have the MAIN or NOMAIN keyword in your Control statements, it is a cycle module.
This page in the documentaiton explains about the three types of RPG modules, and it describes how *inlr affects a cycle module. https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzasd/cycvslinear.htm
Upvotes: 10