1) How to define keyed file in CL pgm.
2) How can i read particular records in CL pgm from
database file.
Answer Posted / 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 |
Post New Answer View All Answers
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
how do I play {insert rpg system here}?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
What is the difference between iter and do?
How to write record if no field or the field are different in physical file in rpgle ?
What is the difference between copybooks and subprocedures in as400?
What is a record lock error?
Explain mdt?
what is the use of sflnxtchg?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
What are the types of identifiers?
how can I tell when to replace the array?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
How can we know running job is batch or interactive?