Consultor Eletrônico



Kbase P128722: INSTANTIATING-PROCEDURE in RUN statement with parameter doesn't compile
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/4/2008
Status: Unverified

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1B

SYMPTOM(s):

INSTANTIATING-PROCEDURE in RUN statement with parameter doesn't compile

When compiling a RUN statement which uses a chained reference to the INSTANTIATING-PROCEDURE attribute to RUN IN ... and passing parameters to the target procedure, compiler errors are returned to the effect that an invalid number of arguments were passed to the attribute rather than the target procedure.
e.g.
RUN foo IN THIS-PROCEDURE:INSTANTIATING-PROCEDURE ( INPUT "bar" ).

Invalid number of arguments for attribute <attribute>. (3407)

Invalid number of arguments for attribute INSTANTIATING-PROCEDURE. (3407)

CAUSE:

This is a known issue

FIX:

To workaround this issue either assign the value returned from <handle>:INSTANTIATING-PROCEDURE to a variable then RUN ... IN that, or enclose THIS-PROCEDURE:INSTANTIATING-PROCEDURE in parenthesis.
Workaround #1:
DEFINE VARIABLE hProc AS HANDLE NO-UNDO.
hProc = THIS-PROCEDURE:INSTANTIATING-PROCEDURE.
RUN foo IN hProc ( INPUT "bar" ).
Workaround #2:
RUN foo IN (THIS-PROCEDURE:INSTANTIATING-PROCEDURE) ( INPUT "bar" ).