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


Please Help Members By Posting Answers For Below Questions

How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1561


What is the difference between iter and do?

676


How Chain operation copies the record's data to the input buffer for the program?

1082


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.

2051


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?

617






How to write record if no field or the field are different in physical file in rpgle ?

490


what is a rpg?

701


What is the difference between copybooks and subprocedures in as400?

808


how does the rpg element work?

716


What are the types of identifiers?

572


do you use message subfiles? What are the necessary keywords required coding a message subfile?

687


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

709


How would display prime numbers using CL program?

5678


what is an online rpg?

725


what is *place and *auto keyword in prtf ?plz explain

2724