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

Answer Posted / 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 ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

2045


explain sflclr, sflend, sfldlt, and sflcsrrrn?

884


What is difference between bind by copy and bind by reference?

1724


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

712


how do I declare a minor?

711






how can you display specific subfile page on the screen in unequal subfile?

671


what is the necessary keyword needed to scroll subfile records?

696


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?

489


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

749


if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2189


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3281


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

1457


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

827


How can we override a file during runtime in rpg?

680


how do you use commitment control in rpg?

755