Defining AS/400 Data Areas

5 pts.
Tags:
AS/400
AS/400 Data File
AS/400 Library
Data Area
I need to access a numeric data area. I do not know at program exection time the library of the data area. This is defined within the program.

Software/Hardware used:
AS400 CGIDEV2

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: 6  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
    I do not know at program exection time the library of the data area. This is defined within the program. What is "defined" within the program? The library that contains the data area? What exactly is the problem you need to solve? Are you trying to locate the data area? Are you certain that there will be only one? If there are others, is there a way to recognize the differences? If a testing library exists on the system and it has a duplicate of the data area (same name!), can you tell that it's not the right one? What is your question? Tom
    125,585 pointsBadges:
    report
  • CharlieBrowne
    You should NEVER hardcode a library name in a program. Just let it difault to *LIBL
    41,380 pointsBadges:
    report
  • HMSSL2K
    Not sure what you are asking for here. If the pgm creates the DTAARA, you should know which library it is in I hope. Like CharlieBrowne says "NEVER hard code a LIBRARY in a pgm" it will always cause problems in the future.
    3,175 pointsBadges:
    report
  • TomLiotta
    You should NEVER hardcode a library name in a program. ...except when necessary. In the vast majority of cases, particularly home-grown software development, it shouldn't be necessary. But there are circumstances where you do not want external control to change what a program accesses. Just let it difault to *LIBL ...unless the library isn't in *LIBL. In the case of the question, the function probably involves access through the HTTP server. It's very likely that *LIBL won't help. But perhaps an external object such as a job description could be retrieved. Job descriptions are handy for storing lists of libraries. The function could retrieve a list of libraries and search for the data area within that list. That allows the list to be maintained outside of the program. Tom
    125,585 pointsBadges:
    report
  • PGMBOB
    Run the program In debug mode. Step through to see where the dtaarea is created.
    1,120 pointsBadges:
    report
  • WilsonAlano
    Hi, In V5R4 you can use DTAARA(*VAR:var_with_data_area_name) var_with_data_area_name can use any of the following formats dtaaraname libname/dtaaraname *LIBL/dtaaraname Regards, Wilson
    2,485 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