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 does the rpg element work?
What are the commands that can be executed in CLP but not in RPG? Why?
You have a *USE authority on a Library and *All authority on a file in that Library.Can you change the data in that file?
suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
What is the difference between iter and do?
Suppose we have 10 records with same name and we are reading using READE,after 4 record i have to use CHAIN what is the output
RPG/400 faqs?
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.
what is ment by "MDT"
How many program bind in one module....