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
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
How many program bind in one module....
how do you use commitment control in rpg?
how does the rpg element work?
What are the types of identifiers?
How can we override a file during runtime in rpg?
When it is desirable to describe files Internally?
what is the procedure and explain about real time scenario.
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
explain sflclr, sflend, sfldlt, and sflcsrrrn?
how do I declare a minor?
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 the difference between do while and do until?
what is the necessary keyword needed to scroll subfile records?
what are the key words you must use when using a subfile?