‎2009 Feb 04 1:37 PM
Hi All,
I want to know how to remove a program from memory.
I will explain exactly my requirement.
I have 3 main programs with me, as:
1. Report - program name : PRG1
2. function module: FM1 - main program : FG1
3. function module : FM2 - main program : FG2
i am calling these two function modules inside the report in FM1 and FM2 sequence.
Report PRG1.
start-of-selection.
call function 'FM1'
call function 'FM2'
END-of-selection.
When i call the first function module FM1 the main program FG1 will be loaded to memory.
When i call the second function module FM2 the main program FG2 will also be loaded into memory.
Now my memory will have three main programs : PRG1, FG1, FG2.
My requirement is to remove the main program FG1 from memory, which means to say i should not be able to access any variable from FG1 through ASSIGN statement : ASSIGN ('(FG1)VAR1') to <fs>.
Basically after removing FG1 program, the memory should have : PRG1, FG2 programs only.
Please suggest how to do this.
Thanks,
Srinath S
‎2009 Feb 04 3:21 PM
Would it be sufficient if FM1 cleared all global data at end of processing?
Thomas
‎2009 Feb 04 5:59 PM
Hi,
That is what i want. I need to remove all the global variables of FG1 program from memory. All the relevant data of the program FG1 should be removed from memory.
Thanks,
Srinath S
‎2009 Feb 04 5:58 PM
Hi,
That is what i want. I need to remove all the global variables of FG1 program from memory. All the relevant data of the program FG1 should be removed from memory.
Thanks,
Srinath S
‎2009 Feb 05 8:33 AM
What I meant is that instead of using whatever erase functionality (I wouldn't know one), the code inside the function modules of FG1 should clear all global data with CLEAR and REFRESH statements before returning to the calling program. Even better would be to not use any global data in FG1 in the first place, if possible, rather work with local data declarations only inside the function modules.
Thomas