Consultor Eletrônico



Kbase P158166: 4GL/ABL: Error (361) using VALIDATE option of FORMAT phrase in a SET, UPDATE or DISPLAY statement re
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/05/2010
Status: Verified

SYMPTOM(s):

4GL/ABL: Error (361) using VALIDATE option of FORMAT phrase in a SET, UPDATE or DISPLAY statement referencing un-subscripted arrays.

Using the VALIDATE option of FORMAT phrase errors in a SET, UPDATE or DISPLAY statement of un-subscripted array references generates error (361).

** Only individual array elements are allowed in expressions or on the right-hand-side of non-array assignments. (361)

Running any of the following three 2 line code snippets from the Procedure Editor generates the above error:

/* A. DISPLAY snippet */
DEFINE VARIABLE iVariable AS INTEGER EXTENT 1 NO-UNDO.
DISPLAY iVariable VALIDATE(iVariable > 0, "iVariable must be positive").

/* B. UPDATE snippet */
DEFINE VARIABLE iVariable AS INTEGER EXTENT 1 NO-UNDO.
UPDATE iVariable VALIDATE(iVariable > 0, "iVariable must be positive").

/* C. SET snippet */
DEFINE VARIABLE iVariable AS INTEGER EXTENT 1 NO-UNDO.
SET iVariable VALIDATE(iVariable > 0, "iVariable must be positive").


FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.2B

CAUSE:

Bug# OE00194392

FIX:

Upgrade to OpenEdge 10.2B01 or later. If upgrading to OpenEdge 10.2B01 or later is not feasible, a workaround is to explicitly use subscripted array references with the SET, UPDATE or DISPLAY statements whenever the VALIDATE option of the FORMAT phrase is also used. For example, the following modified code runs error free:

/* C. SET snippet Modified */
DEFINE VARIABLE iVariable AS INTEGER EXTENT 1 NO-UNDO.
SET iVariable[1] VALIDATE(iVariable > 0, "iVariable must be positive").