1.Write code to read the records from a file and load an
array of size 99? Make sure that you take care of all the
error conditions?
Answer Posted / rosh
Fpf1 if e k disk
D Max s 2p 0 inz(99)
d Lowrec s 2p 0 inz
Read(e) PF1
Dow not %EOF(PF1)
IF Lowrec <= Max
Move record to array(Lowrec)
eval Lowrec = Lowrec + 1
else
Leave
Endif
Read(e) Pf1
ENDDO
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
is this a rpg channel?
what is the procedure and explain about real time scenario.
which program rpg or cl is efficent to update a transaction onto a database file and why ?
what is *place and *auto keyword in prtf ?plz explain
what was the robotech rpg?
When it is desirable to describe files Internally?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
what is kids-rpg?
What is the difference between copybooks and subprocedures in as400?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
What is ment by record level identifier?
What is the purpose of record level identifier?
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 you use commitment control in rpg?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?