Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Removing program from memory

Former Member
0 Likes
625

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

4 REPLIES 4
Read only

ThomasZloch
Active Contributor
0 Likes
536

Would it be sufficient if FM1 cleared all global data at end of processing?

Thomas

Read only

0 Likes
536

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

Read only

Former Member
0 Likes
536

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

Read only

0 Likes
536

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