1. I have2 records in a PF.
READ PF
DO
DSPLY EMPNO
RETRN
DSPLY EMPNO
ENDDO
What was the output
2. SETON LR vs RETURN
3. Primary File
4. How to delete a deleted spaces
5. How to read a PF in reverse order in CL
6. I have a object in Lib A, B and C. But it shows in D
Lib..Why?
7.
Answers were Sorted based on User's Feedback
1A: system will display the first record data and will exit
the program and when ever you recall that program 2nd time
from the same session then system will display the second
record data and subsequent calls from the same screen will
display the second record data only.
2A: SETONLR will close the files and then close the program
and exit the program but RETURN will remain open the opened
file and exit the program with out closing the files.
3A: Once if you define the file as primary file then system
will seuqnetial read the all the recods in that program and
then only it will exit the program, if you use the primary
file alone ina program you need to use the SETONLR because
system it self will close the file once it reaches the EOF.
4A: deleting the deleted space in the sense we are trying
reuse the space of deleted records for that we can it using
the command called "Reorganize Physical File Mbr (RGZPFM)".
5A: we can use the OVRDBF & POSDBF commands in CL
| Is This Answer Correct ? | 8 Yes | 0 No |
Once RETURN excute then system exit the program, second
DSPLY will never excute, in first DSPLY EMPNO system will
show the first record value.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / jai
thanks Venkatesh.But one thing in 1 ques..
1. What was the output on both DSPLY EMPNO.
2. Whether after RETRN the DSPLY statement will execute or Not?
3. If its execute after RETRN, What was the Output on 2nd
DSPLY EMPNO
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / srikanth
After executing RETURN statement, any statements next to RETURN will also be executed. In the above code program will display two records. When you call same program again from same session next two records will be displayed. If program is coded with LR indicator, next call of same program will also display same first two records.
| Is This Answer Correct ? | 0 Yes | 4 No |
Are all these RPG/400 Interviewed Questions being asked recently? are current?
i'm working on progA , in that program i want to see the userids of the users who work on this program?
IN RLU what are the record level keyword is used?
What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file
HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE
In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?
what is flat file?
can anybody help me that what is the procedure of debugging the service program?
Can anybody tell me the setps to create .csv file in IFS folder on AS/400. I also need to know how I can send this .csv file to PC in xls sheet.....?
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
how do u find whether a record is locked or not??/
what is plat file?