Can anyone please tell me what is the basic difference between arrays and tables in RPG.

695 pts.
Tags:
RPG
RPG arrays
RPG Tables
RPG/400
Hi All,

Can anyone please tell me what is the basic differance between arrays and tables in RPG and for which type of requirement we have to use arrays and tables.

since there might be bit difference between both of them.

Please explain me.

Answer Wiki

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

Arrays – I use these a lot but rarely use tables – seems like all the new development was in arrays

Array math xFOOT, array = x * array. array3 = array2 * array1
Clear array clears the entire array – should work for table
lookup finds value in array – should work for table
linked tables lookup in table1, return value from table2

Arrays can now be made of data structures
Arrays can now be items in data strucutres
Arrays can now be in arrays

Phil

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
  • CharlieBrowne
    Names of Tables must start with TAB Tables came first and were usually defined in the program.
    41,370 pointsBadges:
    report
  • BigKat
    I still want multi-dimensional arrays array(x:y) would be much clear than outer(x).inner(y)
    7,935 pointsBadges:
    report
  • ASWDEVELOPER
    generally speaking, tables are preloaded at compilation or program initiation and not changed during program execution ... tables are most often used as a checklist or range against which variables or fields are compared using lookup operations ....tables do not have an index value available to the program to tell you which position the element occupies in the table ... arrays are more fluid and are often used to group values together, to alter or manipulate or total these values, or to search or format them ... indexes are used to identify individual elements of the array, and care must be taken by the programmer to make sure never to refer to an element by an index value outside the defined range of the array or the program will abend ...
    405 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