1) How to define keyed file in CL pgm.
2) How can i read particular records in CL pgm from
database file.
Answer Posted / 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 |
Post New Answer View All Answers
What is difference between bind by copy and bind by reference?
what is program status data structure?
What is the purpose of record level identifier?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
which program rpg or cl is efficent to update a transaction onto a database file and why ?
How to handle duplicate error handling in RPG?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
how do I declare a minor?
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.
what is the rpg system?
how do I declare a table or array in rpg iv?
what is the necessary keyword needed to scroll subfile records?
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 do I play {insert rpg system here}?
How to select highest score of each subject or how to select highest income of every month?