Last statement of any RPG pgm is LR?
Answers were Sorted based on User's Feedback
Answer / amit
Not necessary. We can write the codes after SETON LR also
and it will execute that too. The main difference is that
the program will end after the last line of coding you did
and will clear all the access path and variables to blanks
or zeros.
But when you give RETURN then the program will not execute
the below coding part and will end as soon as the RETURN is
encountered,but here it will not clear the access path and
the variables..if you run the program again you will find
the last value in the variable.
hope this will help
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / amit
Not necessarily. LR is generally set on after all
processing is doen i.e. at the end of the program but there
is no hard and fast rule for that.
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sivakumar y
While writing a program Last statement of RPG program need
not be LR. It is the last executable statement. i.e. after
all processing is done LR(Last Record indicator) will be
set on.
NOTE: In a program that does not contain a primary file,
you can set the LR indicator on as one method to end the
program.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / vishal
Not necessary . In case of RPG cycle where primary file is defined, it does not require any LR statement or RETURN opcode. if there is any total calculations in output spec then that is performed at last using L0 indicator.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / syam
No, Last statement is RETURN. Means Exit from program
LR is second last statment. Means move pointer to end of
file.
Ex: CLOS BEGSR
MOVE '1' *INLR
RETURN
ENDSR
| Is This Answer Correct ? | 4 Yes | 9 No |
what is multiple member pf
How to find the list of source physical files in a library?? Is there any way to get a list??
Which keyword is used both in subfile and subfile control record format of a DSPF?
What is the interactive job? What is the batch job?
how to add a new field to a file without compiling it?
i have a PF,it contains 5 members,how to access particular member data from logical file ?and what is the use of member in PF
can any one pls tell me some differences between a LF and command OPNQRYF?
3 Answers Accenture, Cognizant, eFunds,
Why journalling is compulsory before commitment control?
How to retrieve a physical file after deleting that?
How many libraries can be there in a library list?
What is FORMAT keyword and its use?
Hi, Please give the answer to this question? I have Phisical file with 100 records,there is no any duplicate records in this pf.Based on this pf one Logical file i have used.But this lf is viewing only 80 records only of that pf?What is the reason for this?Please give me answer?