Dataarea as a variable

2,555 pts.
Tags:
Data Area
RPGLE
V6R1
Is it possible to address a dataarea by name from a variable field ?

The idea is to keep last used report-no by dept/company in dataareas - one for each dept/company. Multiple dataareas (all *dec 7 0) are needed as report-pgm can print for several different departments/companies. 

Dept-id shall be passed as a parm when report-program is called, and program-proces shall address proper dataarea by dept-id.

 



Software/Hardware used:
IBM Power i with V6R1, RPGLE
ASKED: June 8, 2010  3:27 PM
UPDATED: June 8, 2010  8:40 PM

Answer Wiki

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

I have not done this before, but if you look at the “<a href=”http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/rzasd/sc092508934.htm”>*DTAARA DEFINE</a>” reference you can use a field name to identify the Data Area you wish to use.

I would think you would wish to use a file and log this information in it. Is it possible for more than one user in a department to run a report at the same time?

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
  • TomLiotta
    Also, the D-spec DTAARA keyword can supply a variable name. From the manual: DTAARA{({*VAR:} data_area_name)} If *VAR is specified, the value of data_area_name is used as the data area name. This value can be:
    • A named constant whose value is the name of the data area.
    • A character variable that will hold the name of the data area at runtime.
    • dtaaraname
    • libname/dtaaraname
    • *LIBL/dtaaraname
    Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    That formatting didn't quite come out correctly. Let's see if I can get the last part a little better: You can specify the value in any of the following forms:
    • dtaaraname
    • libname/dtaaraname
    • *LIBL/dtaaraname
    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