× 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.

On 2023-02-23 8:58 p.m., Peter Dow wrote:
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.

It's not a "data area data structure" according to the way the RPG manual defines it. Before there were free-form definitions, a "data area data structure" could only be defined as a UDS, with the 'U' data-structure-type.

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

A "data area data structure" is normally only handled implicitly. If you want to handle it with IN and OUT, you have to do more coding. The fixed-form *DTAARA DEFINE opcode means the same as DTAARA(*USRCTL), and the DTAARA keyword by itself implies DTAARA(*USRCTL).

It was weird before the free-form DTAARA keyword existed. The DTAARA keyword is also weird and complicated because it's duplicating the weirdness of the fixed-form UDS + *DTAARA DEFINE.

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.

That is correct.

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

Also correct.

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.