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.
Answer Posted / venkatesh p
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 |
Post New Answer View All Answers
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
How to handle duplicate error handling in RPG?
what is data area and how it is used in rpg program ?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
How Chain operation copies the record's data to the input buffer for the program?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
how can I tell when to replace the array?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
what is file information data structure?
what is *place and *auto keyword in prtf ?plz explain
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...?
how does the rpg element work?
What is a record lock error?
do you use message subfiles? What are the necessary keywords required coding a message subfile?