Answer Posted / sairam
Using Chain we can set the pointer to the particular record
according the criteria specified in the chain operation. But
in this case, if the record is found then the pointer will
be set, otherwise i.e., if the record does not exist then
the pointer will not set. This is the reason why we check
with the %Found keyword. And moreover after reading the
record (in case if the record found and there are more
number of records with the same keyword), we can not move
to the another record, which meets the same criteria
specified in the Chain operation. So the conclusion is we
can not read more number of records with the Chain
operation, if there are more number of records exist with
the same criteria in the file.
Where as using READE, we can read all the records which meet
the same criteria using subsequent READE operation. If there
are no records with the specified criteria then the pointer
will be set to EOF.
| Is This Answer Correct ? | 70 Yes | 5 No |
Post New Answer View All Answers
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 is file identifier where we can use?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
How Chain operation copies the record's data to the input buffer for the program?
How many program bind in one module....
How can we know running job is batch or interactive?
What is the purpose of record level identifier?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
how does the rpg element work?
what is the use of sflnxtchg?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what is the procedure and explain about real time scenario.
Interviewer asked me write down DDS for load all subfile .can anybody write dds
what is the necessary keyword needed to scroll subfile records?