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



RPG has three different ways of working with data areas.

1) The RPG II style syntax (coding 'UDS' on the D-spec). You appear to be using this.

2) The RPG III style syntax (IN/OUT opcodes, and *DTAARA DEFINE).

3) The RPG IV style syntax, which is DTAARA keyword on the D-spec.

You appear to be using a combination of the RPG II syntax and the RPG III syntax.

When your program starts, it will create a data area named ODKEYS in QTEMP (unless ODKEYS exists somewhere else in your library list) The contents of the @BILDS structure in your program will be populated from the data in ODKEYS. Then, when the program ends, the contents of @BILDS will be written back to that data area in QTEMP.

It's the "UDS" (RPG II style stuff) that forces it to read the data area automatically when the program starts, and writes it when the program ends. Because of UDS you don't need IN/OUT opcodes.

The *DTAARA DEFINE seems only to be used in this case to change the external name to ODKEYS (instead of @BILDS).




On 10/8/2013 12:24 PM, Michael Schutte wrote:
I'm looking at some code that is very confusion to me.

In a routine that is never called (actually named NEVER), there's this
line...


C *DTAARA DEFINE ODKEYS @BILDS


From what I've read is that ODKEYS is supposed to be an external data
structure. However, it doesn't exist on the system whatsoever. ODKEYS is
not a field within the program anywhere, and it's not being built on the
fly in QTEMP or anything. I'm just totally lost.

Before I go any further... @BILDS is defined in the DSPECS.

D @BILDS UDS
D @@BILL 1 7 0
D @@SSEQ 8 10 0


Maybe I'm reading too much into this. But I don't see how the program
compiles when it doesn't know what ODKEYS is. The program does compile.
Could it be some global variable or system variable? I don't know just
throwing it out there.

Any help would be appreciated.


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.