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
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 diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
How to declare the pull button in AS/400..
explain sflclr, sflend, sfldlt, and sflcsrrrn?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
how does the rpg element work?
what is program status data structure?
what is the procedure and explain about real time scenario.
how do you use commitment control in rpg?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
what is the difference between do while and do until?
how do I declare a minor?
is this a rpg channel?