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 |
Maximum how many files declare in rpgle
I have file with data as follows data 1 2 3 4 5 I need to read 1 and 5 ,then 2 and 4 then like.. upto end of file, can any one help on this
what is the rpg system?
When it is desirable to describe files Internally?
How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?
11 Answers Bank Of America, CSC, IBM,
Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
i have 1000 records in pf.what are all the ways to read a particular name records in rpg?? ie.. in pf i have a name called demo appeared around 52 times hw will we read this particular records in rpg/400?.
what is an online rpg?
1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the error through the RPG/400
10 Answers IBM, Tech Mahindra,
what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?
How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?