I don't think the compiler cares whether the data area exists at compile time.  The data definition is determined by the data structure in the result field, much like a program-described file.  The existence and compatibility of the data area only matter at run time.  What happens when you run the program?  Does it create a data area someplace, or fail with an error, or what?
 
Dave Shaw
________________________________
 From: Michael Schutte <mschutte369@xxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx> 
Sent: Tuesday, October 8, 2013 1:24 PM
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.
As an Amazon Associate we earn from qualifying purchases.