Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



Hi,Please give me complete code with this logic. The question is how to read the records from a fil..

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

Post New Answer

More RPG400 Interview Questions

how does the rpg element work?

0 Answers   IBM,


What are the commands that can be executed in CLP but not in RPG? Why?

1 Answers   CSC,


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?

1 Answers  


suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis

1 Answers  


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...?

0 Answers  


What is the difference between iter and do?

0 Answers  


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

3 Answers  


RPG/400 faqs?

1 Answers   HSBC,


Hi, Can anybody give me real sinario for SFLRCDNBR?with example?

2 Answers  


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


what is ment by "MDT"

2 Answers   TCS,


How many program bind in one module....

0 Answers  


Categories