RPG: INLR statement

346195 pts.
Tags:
AS/400
RPG
I've recently been looking at some legacy programs, such as the following code:

C/free
    Dow 1=1;
        SubRoutine();
    EndDo;
    *INLR = *On;
/end-free
The program that I'm questioning is a "server-like" program, where the sub routine handles incoming requests over the network. I feel like the *INLR=*On statement wouldn't have much of an effect but I truly don't know that much about RPG. Is the last line on this code redundant and unreachable?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb

    redundant, I can't tell if it appears anywhere else in the program.

    unreachable, yes.

    The  *INLR = *On;informs the RPG cycle that it's ok to close all resources when the program ends.  Of couse this one doesn't do anything.  It maybe necessary to have this line simply to fulfill a requirement of the compiler.

    49,950 pointsBadges:
    report
  • TomLiotta
    Yes, it can simply be thought of as a compiler switch. Depending on how the module is compiled and bound to other modules, it might or might not be required. Without seeing how this module fits with others, we can't be sure it's actually needed. It almost certainly isn't a problem to leave it in place. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following