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 can we change element of compile time array?Can we do so

1 Answers   TCS,


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.

4 Answers   HCL,


two attributes which govern the excecution of a job>>>>??

2 Answers   CTS,


what is the difference between the cpyf command crtdupobj command?

9 Answers   IBM,


How to read a record from file where there is multiple record occurrence is available?

1 Answers  


what are the types of identifers

2 Answers   IBM,


what is file identifier wher we can use

1 Answers   IBM,


what r drawbacks of OPM? Why do we go for ILE RPG?

1 Answers  


Why we cannot call a service program? If I add a PEP can i call the service program?

1 Answers   DELL,


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

2 Answers  


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.

6 Answers  


How do you call procedures in ILE?

3 Answers  


Categories