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 AnyOne tell me how to read join logical file in rpg from starting to end?

2 Answers  


I need to generate outfile for object of all the user lib. in the sysmte using cmd DSPOBJD. But this cmd is correcpted in my server,Any body tell me is there any alternative...?

2 Answers  


what is kids-rpg?

0 Answers   IBM,


what is file identifier wher we can use

1 Answers   IBM,


what is overlay? how can we pass parameters in cl or rpg programing? how can we get data area value in cl or rpg programming?

2 Answers   IBM, Patni,


Why did we give STRSRVJOB while debugging batch program

3 Answers   HBL Power Systems,


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  


How to call one program from another program in RPG? please help me with the code

0 Answers   HCL,


what is EXCEPT command in rpg and use

1 Answers   Active Brains,


1.I Have a physical file , i want to read the data from the each and every member of the File in the CL Program.How do you achieve this. 2.How do you do the same in RPG?. do think is it possible to read data from all the members in the RPG?

2 Answers   Cap Gemini,


What is the purpose of FRCDTA keyword?

3 Answers   IBM,


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


Categories