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
How would display prime numbers using CL program?
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 to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
What is difference between bind by copy and bind by reference?
When it is desirable to describe files Internally?
How to select highest score of each subject or how to select highest income of every month?
How can we override a file during runtime in rpg?
is this a rpg channel?
what was the robotech rpg?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
how do you use commitment control in rpg?
what is an online rpg?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
How Chain operation copies the record's data to the input buffer for the program?