I have to retain a variable value , if i come out from a module.
A is calling B.
B is calling C.
In module C I need to perform some paragraph only once, that is when i entered first time into the module C. If i came to module 'C' next time i should not perform that paragraph. For this I did
I have declared a variable as extern.
DCL Flag char(1) extern;
If flag not= 'Y' then
flag = 'Y';
do next process;
When i am coming first time from module B to C, flag is not having any value it is executed, i return back to B i did some process and return back to A. This process is in loop. I came next time to b, b once again called to C, by this time flag didn't have value 'Y'. As of extern or static it should have value until end of the unit.
Please let me know if any other way we can achieve this. with out doing any changes in module 'A'.