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 is the difference between iter and do?
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?
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?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
what is the rpg system?
how can I tell when to replace the array?
how do you use commitment control in rpg?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
What is the difference between copybooks and subprocedures in as400?
What is the purpose of record level identifier?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
How to write record if no field or the field are different in physical file in rpgle ?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
How can we know running job is batch or interactive?