Best regards
stefan.tageson@xxxxxxxx
M +46 732 369 Best regards
so in the following code, is there a way to define the dtaara as the incoming parm value (and actually reference the parm value)?
//------------------------------------------------------
// PI
//------------------------------------------------------
d getdtaarar pi
d p_dtaara 21 const
d p_value 100
//------------------------------------------------------
// Global Variables
//------------------------------------------------------
d $dtaara ds dtaara(p_dtaara)
tia
jay
From the archives:
On 2019-02-11 10:36 AM, Jerry Adams wrote:
...
D EOMClose DS DtaAra(DSName)
... > D DSName S 21a
...
When I run the test I get CPG1015 - Data area DSNAME in *LIBL not found.
As Stefan said, you need to code DtaAra(*VAR:DSName).
But ... warning ... that's only true for a fixed-form D spec. The fixed-form version of the DTAARA keyword assumes that a name is actually a sort of literal. But if it was a free-form D spec, *VAR isn't supported for the DTAARA keyword. Your DtaAra keyword would work if it was a free-form definition.
dcl-ds EOMClose DtaAra(DSName)
The more usual problem with the DTAARA keyword for fixed-form vs free-form is when people are accustomed to coding the DTAARA keyword with a name rather than a literal.
This D spec uses data area *LIBL/DTANAME.
D myDtaara DS DtaAra(dtaname)
But for this free-form definition, dtaname has to be either a named constant or a variable.
dcl-ds myDtaara DTAARA(dtaname)
If you wanted *LIBL/DTANAME, you'd have to put DTANAME in quotes, uppercase.
dcl-ds myDtaara DTAARA('DTANAME')
Sensitivity: Internal
As an Amazon Associate we earn from qualifying purchases.