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



Chris,

Why not write a subprocedure (in a service program) that uses QWCRDTAA to get the *GDA? Maybe two of them called something like getGDA and setGDA? This would be easy enough to write, and you'd only have to do it once and could call it from all your programs.

If APIs are something you avoid, you could make it a CL procedure instead.

In any case, you could write something that would be very easy to use from everywhere, and would work perfectly in fixed or free format. No need to make any sacrifices, then.

-SK

On 3/9/2016 8:30 PM, Chris Pando wrote:
Thanks for all the responses.

What I missed is that you can't do it w/ fixed format RPG, either. The
DEFINE opcode, w/ *DTAARA in factor 1, supports *LDA and *PDA as values,
but not *GDA. The only way to read the group data area in an RPG program is
through a call to the QWCRDTAA API, and the only way to update it is a
combination of CHGDTAARA and QCMDEXC. Curiously enough, the DEFINE opcode
can't be used in a sub-procedure, so it can only be used in a logic-cycle
program We've pretty much abandoned both fixed format and the logic cycle.
But I am still curious as to why RPG recognizes *LDA and *PDA, but not
*GDA. There must be a reason.



date: Tue, 8 Mar 2016 21:37:14 -0600
from: Chris Pando <chris.pando@xxxxxxxxx>
subject: What am I missing, or free-form data structures and the
group data area.

Unless I have missed something, I have found a deficiency in the free-form
data structure definition.

If I want to use the local data area, mapped to a data structure defined
by
an external (reference) file (e.g. LDA),
my declaration would look like:

Dcl-DS lda Ext DtaAra(*LDA) End-DS

No problem. But I can't do the same for the group data area (which our
menu
system uses).

Dcl-DS gda Ext DtaAra(*GDA) End-DS

generates an RNF3343, which says only *LDA and *PDA are valid.

> Have I found something free-from can't do (makes it sort of hard to argue
free-form should be the standard), or am I missing something?

chris@xxxxxxxxx <chris@xxxxxxxxx>
www.brilligware.com <http://www.brilligware.com>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.