How to exit AS/400 screen

620 pts.
Tags:
AS/400
AS/400 Screen
RPG
Actually in screens When F3 is pressed, *IN03 will be turned *ON and exit the screen. My question is how to exit the screen without using *in03 = *off  in the program?
DOW       *in03 = *off

WRITE     FOOTER
EXSR      LOADSR
EXSR      DSPLYSR
ENDDO
SETON                  LR
0

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.

Discuss This Question: 5  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.
  • philpl1jb

    Is this a feature you want to add or some experience that we need to know about. 

    Obviously, clicking the little X in the upper right hand part of the window or otherwise being disconnected would leave the screen

    Pressing any valid function key or the enter key would return to the program. Any number of things in the subroutines could cause the screen not to be displayed.

    54,090 pointsBadges:
    report
  • bvining
    I'm not at all sure I understand what you're really asking, but if it's how to specifically avoid the line '*in03 = *off' then (not *in03) will do the trick.

    Bruce Vining
    7,070 pointsBadges:
    report
  • deepu9321
    It depends on How your program need to work.

    If you need to exit from screen when you press some function key (not F3), You should be looping with specific indicator (IN12, IN16, etc). 

    Or, If you just need to exit from screen with any valid key press (including Enter), Don't have EXFMT  inside loop. so that, it will just execute once and come out of screen with any valid key.

    Pradeep.
    4,980 pointsBadges:
    report
  • hunshabbir7
    I don't see with the code you provided can be exited without switching  on indicator *IN03.
    2,900 pointsBadges:
    report
  • ToddN2000
    You can cancel the program, but that may leave data issues. If you can modify the code, add another indicator. Currently the only way to end the program as it was designed is to use the F3 function.
    132,840 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.

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

Following

Share this item with your network: