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 |
Explain mdt?
difference between CHAIN and READE?
which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?
program to find the number of objects used in a given program through a display.
we hav job which is running as batch. it takes atleast 06hours to complete tht job. bu i wana do tht job with in 3hours.........? so plz post ur answers
How many program bind in one module....
In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?
1) How to retrieve RRN through RPG ? 2) How to pass parameter by value ? 3) How to trap the error through the RPG/400
10 Answers IBM, Tech Mahindra,
what is the equivalent keyword for CHAIN opcode ??
IN RLU what are the record level keyword is used?
can anybody help me that what is the procedure of debugging the service program?
How to find d key field of a pf that doesn’t have source physical file?