|
> From: Joep Beckeringh > > Most obvious solution would be to clean up when you leave. Perform special > calls that make the procedures initialize the static variables when you > leave the program with LR on. Actually, Joep, the most "obvious" solution would be to make calls to the procedure to initialize the variables when I enter the program, in *INZSR. This is doable, but it's really a pain in the butt. When I'm absolutely forced to do this, I simply set all my parameters to *NOPASS and then execute the procedure with no parameters. But it would be a LOT easier to let the machine handle it. The fact that procedures are in some ways different from RPG doesn't mean that you should have to choose between one way of action and another. By specifying a keyword either at the procedure interface or the d-spec level you would have fine-grained control over the actions of the runtime, and you wouldn't have to code dozens of little what are in effect "procedure initialization" routines. And it's not necessary to tie it to the cycle; I think Booth's suggestion of a RESET *GLOBAL command would actually be very powerful. Or maybe RESET *LOCAL to reset just local static variables. Joe
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.