Array size

510 pts.
Tags:
AS/400
AS/400 Arrays
Hi, I have used array to store ItemNUmbers, D Arry S 15A DIM(9999) But I am getting error as Array index is out of range... I knew that file has more item numbers. I need nearly 70000000 So please tell me the maximum size of array.... Ans : DIM( ?????? )

Answer Wiki

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

Discuss This Question: 3  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
  • TomLiotta
    It depends on what version you're using. For V5R3, maximum is DIM(32767). For .1, it's DIM(16773104); but maximum memory space for a data item is 16773104 bytes. If your elements are 15 bytes, then your maximum is DIM(1118206). Putting 70 million item numbers in a memory array is way beyond reasonable for a business process. Use a different structure such as a database index or a user index. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    My "7" key sticks sometimes. The comment should have said "For 7.1, it’s DIM(16773104)...". The limits are in the language reference manual. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    I agree with Tom. This would not be a case for an array. If all you need to do is verify that the item exists use the SETLL on the file keyed on ItemNumber. Then check the %equals( myfile ) for the result. If you need data from the product record use the chain command. You're probably thinking the search of an ascending array would be faster and you're possibly correct but the time to load the array (if it were possible) would offset any speed advantage. Phil
    49,960 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