Consultor Eletrônico



Kbase P108574: 4GL: Error (392) using an include file defining a SHARED VARIABLE and calling another procedure.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/1/2008
Status: Verified

SYMPTOM(s):

4GL: Error (392) using an include file defining a SHARED VARIABLE and calling another procedure.

<program> Shared variable <variable> has not yet been created. (392)

secondproc.p shared variable varname has not yet been created. (392)

Running firstproc.p below generates the error:
/* 1. firstproc.p */
{include.i}.
RUN secondproc.p
/* 2. secondproc.p */
{include.i}.
ASSIGN
varname = 7.
MESSAGE varname
VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* 3. include.i */
DEFINE {1} SHARED VARIABLE varname AS INTEGER NO-UNDO.

FACT(s) (Environment):

Progress 8.x
Progress 9.x
OpenEdge 10.x

CAUSE:

The first instance of including the include.i file in firstproc.p must specify the argument to be "NEW" or "NEW GLOBAL" .

FIX:

Change the include statement in firstproc.p from:
{include.i}.
To:
{include.i "NEW"}.
Or To:
{include.i "NEW GLOBAL"}.