coding with load array

195 pts.
Tags:
i5
RPG
Hi, Thsi si stiffen.Im a RPG developer I5.Im doing some coding practicing for giving training my students. Can anybody tell me how to read a record from the file with load an array of size with error condition

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Can you make it a little clearer what you want to do?

Regards,

Martin Gilbert.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Alopez1571
    The question itself is not so clear but let's give some tips about the subject. If you want to read records from a file and handle error condition, the extensor (e) is the best choice. Also, and Indicator number in the LO column (middle one) allow us to do the same. With the extensor code we can use the Built-in function %Error. For example: Read(e) File1 If %Error Leave Endif For loading an array from a file data you have to code yourself as there is not an automatic procedure nor instruction to do it. There is a prerun-time array wich is based on a program described file. You have to keep in mind that Arrays have limits of entries, 32767 records is around the max capacity. If you're loading an array from a file you must avoid the out of subscript error by overflowing the limit.
    150 pointsBadges:
    report
  • Cwc
    With some creative data structure array definitions, you could have an array loaded automatically as a record is read from a file. You could create an external data structure based on the physical file definition, and define that structure into an array. For a start, here are two good articles about the modern capabilities of data structures in RPG IV. http://search400.techtarget.com/tip/0,289483,sid3_gci1208954,00.html http://search400.techtarget.com/tip/1,289483,sid3_gci902821,00.html Also, Version 6.1 of IBM i (formerly known as OS/400 / i5/OS) has removed the array element limit.
    4,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following