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
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:
Tom
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:
Tom