× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



By the way, it's the exfmt screen1 that's resetting the I.Exit flag for 
you!  That's why you need to test where I've indicated...


Mike



rpg400-l-bounces@xxxxxxxxxxxx wrote on 23/09/2005 11:30:54:

> Just a simple oversight.  See arrow below.
> 
> Basically the user has signalled end-of-program.  So respect their 
wishes 
> and break out at this point.
> 
> BUt I usually just seton LR and return as soon as I detect an F3...
> 
> Hope this helps
> 
> 
> Mike 
> 
> rpg400-l-bounces@xxxxxxxxxxxx wrote on 23/09/2005 11:13:38:
> 
> > Hi there.
> > 
> > I have the following code (greatly simplified).
> > 
> > /free
> > exfmt screen1;
> > dow not I.Exit;
> > // read some stuff, do some stuff
> > exfmt screen2;
> > dow not I.Exit and not I.Cancel;
> > // read some stuff, do some stuff
> > exfmt screen2;
> > endDo;
> 
> ------->  test I.Exit and LEAVE outer loop at this point
> 
> > exfmt screen1;
> > endDo;
> > *inlr = *on;
> > /end-free
> > 
> > "I" it's a DS holding the indicators being set by the command keys at 
> the
> > interactive stage (03 and 12 respectively).
> > 
> > My plan was: if you press F12 on screen2, you go back to screen1. But 
if 
> you
> > press F3 on either screen you go out of the program directly.
> > 
> > The sucker only works half through. I can exit the program from
> > screen1 pressing
> > F3, and I can go back from screen2 pressing F12. But attempting to 
Exit 
> the
> > program from screen2 gets the same effect than pressing F12 (I get 
back 
> to
> > screen1).
> > 
> > Is the I.Exit indicator reseted by the sole action of reading it in 
the
> > innermost 'dow'? Shouldn't it be still on when the program gets back 
to 
> the
> > outermost loop (and hence skipping it altogether?). On my mind this 
> seems to
> > be the cleaner path. It's rather frustrating that it doesn't work.
> > 
> > Thx and regards, and excuse the lameness for the question. I could 
have
> > written a workaround for this, but I'd like to understand what's going 

> on.
> > 
> > I.-
> > -- 
> > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
> list
> > To post a message email: RPG400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> > or email: RPG400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> > 
> > 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.