|
Dave, It depends. They are static and global to the module. It will be the same under the conditions you describe except when another procedure in the module is called and changes the indicators value between calls. IE: SUB_PROC_A sets on *IN01 then returns. Then SUB_PROC_B in the same module is called which sets off *IN01. Because the indicator is global when you call SUB_PROC_A it will be off. Best practice is to avoid using indicators, possible on V4R2. If you must use the indicator I would move the indicator to a static variable and move *IN01 to the variable immediately after *IN01 is used. Then always refer to the variable. I would also localize indicators wherever possible. You can localize an indicator to by saving it to a variable on entry and restoring it on exit. IE: Define a variable as LIKE(*INXX). Eval that variable to be = *INXX on entry and use an eval *INXX = variable on exit. On V4R2 you can avoid most indicator use with the new built in functions. Use %EOF, %EQUAL, %FOUND, %OPEN, %ERROR, and %STATUS. There is also a new operation extender "E" to be used to set the error status %ERROR. David Morris >>> "David Prowak" <prowakd@emi.com> 07/21 12:10 PM >>> Hi, Are indicators that are used in a subprocedure stored in static storage or automatic storage? If I leave SUB_PROC_A with *IN01 = *ON, and the activation group that SUB_PROC_A runs in is a named activation group that is not (for the time being) deleted, the next time I CALLP SUB_PROC_A, will *IN01 still = *ON? Dave +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.