|
I think there is a difference - the RETRN opcode instructs the program to return to its caller at that instant, whereas setting on the RT indicator will cause the program to return to its caller at that point during the cycle where the RT/LR indicators are checked. So if RT is set on half way through detail-time calcs, the program will not return to caller until after total-time calcs have been done and LR has been checked too. Its a long time since I used the cycle, so I hope I am not missing/forgetting anything here ! hth Nigel. <snip>.... Per my last post: Is setting on the RT indicator functionally equivalent to using the RETRN op code? Sorry for the error. Again, thanks for any help. <endsnip> <snip> Return Indicator (RT) You can use the return indicator (RT) to indicate to the internal RPG logic that control should be returned to the calling program. The test to determine if RT is on is made after the test for the status of LR and before the next record is read. If RT is on, control returns to the calling program. RT is set off when the program is called again. Because the status of the RT indicator is checked after the halt indicators (H1 through H9) and LR indicator are tested, the status of the halt indicators or the LR indicator takes precedence over the status of the RT indicator. If both a halt indicator and the RT indicator are on, the halt indicator takes precedence. If both the LR indicator and RT indicator are on, the program ends normally. RT can be set on as a record identifying indicator, a resulting indicator, or a field indicator. It can then be used as a conditioning indicator for calculation or output operations. .... <endsnip> +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.