Don Cavaiani wrote:
Is it possible to change the value of a CL variable to the value
of certain bytes in the *LDA?
At some point in time, the CHGVAR was enhanced to enable access
directly to the *LDA for both set and get [using the %substring builtin
function]. I do not see any *LDA support in ADDRESS() parameter of the
DCL [declare variable], so I do not know if\what data type capabilities
CHGVAR could give beyond enabling using CHGVAR; i.e. simply removes the
requirement to use RTVDTAARA, and the same substring issue remains. It
would be possible to declare typed data directly over the storage using
a BASPTR [basing pointer] if the CHGVAR could use the %ADDR() to get an
address to the *LDA. Presumably not possible, neither by CHGVAR &PTR
%ADDR(%SST(*LDA 1 1)) nor %ADDR(*LDA) since %ADDRESS() builtin function
apparently only supports a CL variable name.
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rbam6/rbam6.pdf
Documented for %sst it is suggested that one may "code *LDA in place of
the character variable name to indicate that the substring function is
performed on the contents of the local data area."
The above on\by v5r4. I am not sure about any more on 6.1
Regards, Chuck