Hi,Please give me complete code with this logic.
The question is how to read the records from a file with
load an array of size with error condition?
(The logic is
Z-Add 0 IDX
*LOVAL SETLL FILE
READ FILE 99
*IN9 DOWEQ *OFF
IDX ANDLT 99
ADD 1 IDX
MOVE FIELD ARR,IDX
READ FILE 99
ENDDO)please give me complete code with
explanation?
Answer / indraneel
Z-Add 0 IDX --- Initialize a array index field to 0
*LOVAL SETLL FILE -- repostion pointer to a file.
READ FILE 99 -- read file (EoF indicator is *in99)
*IN9 DOWEQ *OFF -- read FILE till EoF not reached
IDX ANDLT 99 -- and array index is less than 99
ADD 1 IDX -- add one to index
MOVE FIELD ARR,IDX -- moved data from FILE (field)
to array ARR(1)..
READ FILE 99
This code is reading records from a file and moving the
FIELD data to a array..
| Is This Answer Correct ? | 1 Yes | 0 No |
How can we change element of compile time array?Can we do so
what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.
two attributes which govern the excecution of a job>>>>??
what is the difference between the cpyf command crtdupobj command?
How to read a record from file where there is multiple record occurrence is available?
what are the types of identifers
what is file identifier wher we can use
what r drawbacks of OPM? Why do we go for ILE RPG?
Why we cannot call a service program? If I add a PEP can i call the service program?
in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm
Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.
How do you call procedures in ILE?