Consultor Eletrônico



Kbase P138431: DOC: The documentation description of OVERLAY AT option of the COPY-LOB statement has an error.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/12/2008
Status: Unverified

SYMPTOM(s):

DOC: The documentation description of OVERLAY AT option of the COPY-LOB statement has an error.

The documentation erroneously states:
"If the specified overlay position is [...] greater than the size of the object [...] the AVM raises the ERROR condition."

The following 4GL/ABL code demonstrates that the documentation is wrong:

DEFINE VARIABLE lcSource AS LONGCHAR NO-UNDO INITIAL "SourceObject".
DEFINE VARIABLE lcTarget1 AS LONGCHAR NO-UNDO INITIAL "TargetObject1".
DEFINE VARIABLE lcTarget2 AS LONGCHAR NO-UNDO INITIAL "TargetObject2".
DEFINE VARIABLE lcTarget3 AS LONGCHAR NO-UNDO INITIAL "TargetObject3".
/*
This COPY-LOB statement succeeds, as expected, because the specified
overlay positions is NOT greater than the size of the target object.
*/
COPY-LOB FROM lcSource TO lcTarget1 OVERLAY AT LENGTH(lcTarget1).
/*
The following two COPY-LOB statements happily succeed also when they,
according to documentation, should fail because the specified overlay
positions is greater than the size of the target object!!!
*/
COPY-LOB FROM lcSource TO lcTarget2 OVERLAY AT LENGTH(lcTarget2) + 1.
COPY-LOB FROM lcSource TO lcTarget3 OVERLAY AT LENGTH(lcTarget3) + 10.
MESSAGE
STRING(lcTarget1) "~n"
STRING(lcTarget2) "~n"
STRING(lcTarget3)
VIEW-AS ALERT-BOX.

According to the description currently in the documentation, the last two COPY-LOB statements should fail. However, they do not fail.

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1B
OpenEdge 10.1C
OpenEdge 10.2A

CAUSE:

Bug# OE00178613

FIX:

This issue has been logged as a documentation bug. The corrected documentation will state something along the following lines:
If the position in the target object of the OVERLAY AT option is longer than the target itself, ABL pads target with blanks, when necessary, to match position.