How to use column values in a array

1,355 pts.
Tags:
AS/400
AS/400 Arrays
RPGLE
Hi, I have a file has some column as abc1,abc2,abc3,abc4.....abc40 Now I want to use this column values in a 2 length array with 40 element. Is it possible to achieve this? Thanks
ASKED: October 30, 2013  4:48 AM
UPDATED: October 30, 2013  12:01 PM

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: 1  Reply

 
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

    There are a number of ways to do it. Simplest for you would probably be something like this:


    D ds            e ds                  extname( myFile )
    D myFlds                         2    overlay( ds : 10 ) dim( 40 )

    Use the name of your file for "myFile". And I used a position of (10) for where the array started in the DS, but you'd want the starting position for ABC1.

    Also, if the fields aren't contiguous in the record, it gets more complicated. Overall, it depends on just what you'll do with the record.

    Generally, it's usually not the best design to have a database row with an array of values in columns. It often makes many database operations more complex.

    Tom

    125,585 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