× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.

Are you saying that a data structure with the DTAARA keyword without the *AUTO parameter is not a "data area data structure"? Even though it is a data structure related to a data area? I'd argue that they're both data area data structures, and that the *AUTO parm indicates the *INIT and *TERM phases read and write it.

On page 211 of the7.4 RPGLE Reference manual it says

"You can specify the data area operations (IN, OUT, and UNLOCK) for a data area that is implicitly read in
and written out. Before you use a  *data area data structure***with these operations, you must specify that
*data area data structure* name in the result field of the *DTAARA DEFINE operation or with the DTAARA

Now I'm wondering about the *USRCTL parameter. If both *AUTO and *USRCTL are specified, that should mean that the data area is read during the *INIT phase, can be read (IN opcode) and written (OUT opcode) at any time after the *INIT phase and before the *TERM phase, and then is written during the *TERM phase.

If *AUTO is specified, but not *USRCTL, what does that mean? Using the IN and OUT opcodes with that data structure is not allowed?

If I weren't sitting here with a cat on my lap that wants to be petted, I'd get connected and try it out.

On 2/23/2023 3:47 PM, Barbara Morris wrote:
On 2023-02-21 3:37 p.m., Peter Dow wrote:
Thanks Vinay.

Both the PDF and the online documentation for 7.4, and what you said, are misleading. They appear to state the the *AUTO parameter of the DTAARA keyword is what makes it a data area data structure, but in fact it is the DTAARA keyword that does that, not the *AUTO parameter. The PDF is particularly bad in that it does not explain what the *AUTO parm actually indicates.
It's actually the combination of the DTAARA keyword plus *AUTO.

A "data area data structure" is a data structure that is automatically read and locked during the *INIT phase and automatically written out and unlocked during the *TERM phase when *INLR is on.

With the DTAARA keyword but without *AUTO, it's just a data structure that can be used to read/write a data area with the IN and OUT opcodes.

I agree that the documentation isn't great for the DTAARA keyword.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2023 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.