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
What are the types of identifiers?
Explain mdt?
How to declare the pull button in AS/400..
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
How many program bind in one module....
can I touch the array during treatments?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
explain sflclr, sflend, sfldlt, and sflcsrrrn?
how can I tell when to replace the array?
What is difference between bind by copy and bind by reference?
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 Chain operation copies the record's data to the input buffer for the program?
How to call one program from another program in RPG? please help me with the code
How can we override a file during runtime in rpg?
what is file information data structure?