What will happen if we r using seton lr after return or vice
versa.
Answer Posted / guest
The system return the control from called program to the
calling program when RETURN encounter.Suppose LR is also ON
after the RETURN executed,all resources will be release.
For example,
A program pgm1 call the another pgm2 within a loop,
/free
num=0;
dow not %error;
callp(e) pgm2();
enddo;
/End-free
The pgm2 where the return is executed before LR turned ON
/free
num=num+1;
return;
/End-free
we can see the value of num will be increase all the time
when pgm1 will call the pgm2.
and opposite case:
/free
num=num+1;
*inlr=*on;
return;
/end-free
value of num will be start from zero.
| Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
what is file information data structure?
what is program status data structure?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
how do I declare a minor?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
what is the rpg system?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
how do I declare a table or array in rpg iv?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
what do you mean by an input subfile, what are the keywords required?
What is the difference between iter and do?
What is ment by record level identifier?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
How to declare the pull button in AS/400..
what is the difference between do while and do until?