1) How to define keyed file in CL pgm.
2) How can i read particular records in CL pgm from
database file.
Answers were Sorted based on User's Feedback
Answer / prabhas
1. Using DCLF command
2. OVRDBF with Position parameter
DCLF FILE(&FILENAME)
OVRDBF FILE(&FILENAME) POSITION(*KEY 1 FMT2 X'123F')
The system searches for a record from the record format
FMT2.
A single key field is used in the search (even though the
key value may have more key fields).
The record contains the hexadecimal value 123F (the
hexadecimal equivalent of packed decimal value 123.0). You
get this record when it is found.
Is This Answer Correct ? | 22 Yes | 0 No |
Answer / svankipu
See
1. In DCLF command u can declare a keyed-PF or an LF(having
desired keys)
2. In OVRDBF command u have an attribute called KEYFLD,
wherein u can mention the key-field of the above file.
Then you can use POSDBF command to position the PF or LF &
read it using RCVF command.
That's it!
Is This Answer Correct ? | 5 Yes | 4 No |
what is the difference between do while and do until?
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?
What is the name of default out queue when user logs inn to syatem with valid profile?
Can we journel logical file and access path? Can we use commitment control for non-join L.F?
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic
we are sending data of physical file to screen design and it is showing no record why?
What is the difference between RPG/400 and RPG4
Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?
Can any one plz explain the concept of INFSR, *PSSR, INFDS AND PSDS, I' confusing about PSDS and *PSSR, Wat is the difference btw them, wat PSDS will do????
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
Can AnyOne tell me how to read join logical file in rpg from starting to end?
1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.