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



In my experience
...this is a dtaara named @Bilds and the data itself is found in the *Lda
(UDS)
...we have many old leftover "UDS" defenitions representing the Users *Lda
...which would have been loaded with data somewhere in the CL prior
...or this could also update it
...but it wants the qtemp dtaara(ODKEYS) to look like what's coming in

Not that the other is wrong, but this is another way of how it is used

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Scott Mildenberger
Sent: Tuesday, October 08, 2013 10:56 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: RE: DEFINE *DTAARA Confusion.

According to the manual you don't need the IN statement as the U causes it
to be read during initialization. Adding the DTAARA(ODKEYS) keyword changes
it to look for ODKEYS for the data area instead of @BILDS I think. I think
the other response saying it is only found at run-time may be correct also.

Scott Mildenberger
Programmer/Analyst
Davis Transport Inc.
Missoula, MT
406-728-5510 x128


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Michael Schutte
Sent: Tuesday, October 08, 2013 11:51 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: DEFINE *DTAARA Confusion.

Thank you for your input. @BILDS is not on the system either.

The calling program has the exact same thing in it. The DSPECS, the DEFINE,
but has an OUT @BILDS opcode.

The issue is arising because I'm writing a new program where I need to get
the data from this UDS. Originally, I had

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

/free
In @BILDS;
*inlr = *on;
/end-free

Compiler says that @BILDS is not a data area.

"The Factor 2 operand of IN or OUT is not a data area"

But I can get the program to compile if I add Dtaara(ODKEYS) to the dspecs.

D @BILDS UDS Dtaara(ODKEYS)
D @@BILL 1 7 0
D @@SSEQ 8 10 0


Wow strange, ODKEYS is coming from somewhere, just not sure where. Maybe a
user defined type? but wouldn't that be on the system somewhere?



On Tue, Oct 8, 2013 at 1:38 PM, Scott Mildenberger <
SMildenberger@xxxxxxxxxxxxxxxxxx> wrote:

I am guessing you don't need that line in the program anymore but it
may have been used at some time in the past. I am pretty sure you
won't find any IN or OUT statements using ODKEYS.

The key to what is happening is the U in the data structure definition.
An edited excerpt from the manual:

U defines a Data-area data structure.
-RPG IV retrieves the data area at initialization and rewrites it at
end of program.
- If the DTAARA keyword is not specified, the name in positions 7-21
is used as the name of the external data area.

So I would think you have a data area on the system named @BILDS that
is read at the beginning of you program and written at the end
automatically for you.


Scott Mildenberger
Programmer/Analyst
Davis Transport Inc.
Missoula, MT
406-728-5510 x128


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Michael Schutte
Sent: Tuesday, October 08, 2013 11:25 AM
To: RPG programming on the IBM i / System i
Subject: DEFINE *DTAARA Confusion.

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.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



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.