Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What will happen if we r using seton lr after return or vice
versa.

Answers were Sorted based on User's Feedback



What will happen if we r using seton lr after return or vice versa...

Answer / naveen chandra joshi

The question asked is:
What will happen if we r using seton lr after return or vice
versa?
Answer: When we use SETON LR after Return, SETON LR will never be executed because before this operation could be performed, Return will send the control back to the called program.
When we use SETON LR before Return then the program will release all the used resources (like open files, variables, any API used, etc) and then return statement will be executed which will send the control back to the called program. I hope your question has been answered.

Regards,
Naveen Chandra Joshi
+91.9891501280

Is This Answer Correct ?    14 Yes 0 No

What will happen if we r using seton lr after return or vice versa...

Answer / 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

What will happen if we r using seton lr after return or vice versa...

Answer / zhang

Renjith, Return opcode will be execute even you have set on
LR. LR just use to clear envirment, but not leave the
program. If you using seton lr after return, I think the
Seton LR will never be processed. Means that the indicates
and file statues will not be reset.

Is This Answer Correct ?    11 Yes 2 No

What will happen if we r using seton lr after return or vice versa...

Answer / sravan

Seton lr is last record indicator when it reaches system will close all the files what are the programs used in the program return the status will be the same

Is This Answer Correct ?    0 Yes 0 No

What will happen if we r using seton lr after return or vice versa...

Answer / renjith

If we use seton LR before return all the files opened will
get closed and program will exit. Return wont get execute.

Likewise in opposite case it wont execute seton LR

Is This Answer Correct ?    1 Yes 20 No

Post New Answer

More RPG400 Interview Questions

Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?

2 Answers   HSBC,


what is a rpg?

0 Answers   IBM,


what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code

2 Answers   IBM,


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

0 Answers  


In how many ways a session/device error occurs,,, and what is the remedy for it?

3 Answers  


1.CA(command Atention key)& CF(command Function key) difference with example?Please can any body tell me in real time exp? 2.Can any body tell me some mandatery function keys using while creating any screen with use of SDA-FUNCTION kEYS?

5 Answers   HCL,


in which journalling which attributes are necessary??/

1 Answers   CTS,


How can a screen field that has changed since the last output operation be detected?

4 Answers   IBM,


WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?

2 Answers  


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,


Can we found a record existance in a file w/o reading the file?

6 Answers   Traitsys Technologies,


Categories