× 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.



On 29 June 2016 at 10:52, Barbara Morris <bmorris@xxxxxxxxxx> wrote:
On 6/28/2016 7:23 PM, John R. Smith, Jr. wrote:

This may be way off base because I haven't touched a "cycle" program in
forever but is this RPG an "input primary" program? It seems to me
(thinking back 20+ years) that, even with *INLR turned on manually, an
input
primary continues to processing records until EOF.


No, the program ends when *INLR is set on, either manually or by reaching
end of file in the primary file.

Ooohhhh, a trap for young players!

The program /will/ terminate if LR is on, but not immediately!

LR is not tested until the next *GETIN. See the simplified cycle at
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/gencyc.htm
(step 7) or the detailed cycle at
http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/pgmcycdtl.htm
(step 47).

The basic idea is that if the program stays in the detail calcs, say
with a GOTO/TAG or a DO loop, then the program will not terminate
despite LR being on. I've seen (and cursed at) a *PSSR that blindly
goes back to *DETC in order to 'handle' errors.

The same situation can occur during total calcs.

dcl-s x int(10);

for x = 1 to 10;
*inlr = *on
dsply x;
endfor;

All the DSPLYs happen.

--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.