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 |
1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
if i have three programs progA,progB and progC .now i call progB from progA. but the progB does not exist . now i want to call progC instead of starting dump. how can we achieve this.
Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?
what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.
What is journalling and commitment control?
if there is pf in two libraries and there is a logical file based on the PF, how to find the pf on which the pf is based.
wat is curser?? and its types???
Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?
How to sort an array in descending in RPG
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
ESCAPE message sent by child program can be handled by parent program using which keyword?