Kbase P162112: 4GL/ABL: Error 9324 concatenating a LONGCHAR and a CHARACTER variables
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  18/03/2010 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL: Error 9324 concatenating a LONGCHAR and a CHARACTER variables
Attempt to exceed maximum size of a CHARACTER variable. (9324)
The error is generated assigning the concatenation of a LONGCHAR variable and a CHARACTER variable to a CHARACTER variable.
The error occurs assigning to a target CHARACTER variable the result of appending a LONGCHAR variable to a CHARACTER variable as in the following code snippet:
DEFINE VARIABLE v_CHARACTER_1 AS CHARACTER NO-UNDO.
DEFINE VARIABLE v_CHARACTER_2 AS CHARACTER NO-UNDO.
DEFINE VARIABLE v_LONGCHAR AS LONGCHAR NO-UNDO.
ASSIGN
v_CHARACTER_1 = FILL ("A", 15991)
v_LONGCHAR = FILL ("B", 16000).
/* The following statement generates the error */
ASSIGN
v_CHARACTER_2 = v_CHARACTER_1 + v_LONGCHAR.
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.1x
OpenEdge 10.2A
OpenEdge 10.2B
CAUSE:
BUG# OE00196325
FIX:
None at this time. However, the following two workarounds have been identified for this issue. Please note that either workaround will suppress error 9324 ONLY if both the length of the LONGCHAR and the length of the concatenation result are less than 32K. Otherwise, the error will be justifiably returned:
1. A work around is to use a second intermediate CHARACTER variable to temporarily store the data of the LONGCHAR variable. In other words, instead of doing:
ASSIGN
v_CHARACTER_1 = FILL ("A", 15991)
v_LONGCHAR = FILL ("B", 16000).
ASSIGN
v_CHARACTER_2 = v_CHARACTER_1 + v_LONGCHAR.
Do:
ASSIGN
v_CHARACTER_1 = FILL ("A", 15991)
v_LONGCHAR = FILL ("B", 16000).
ASSIGN
v_BridgeChar = v_LONGCHAR
v_CHARACTER_2 = v_CHARACTER_1 + v_BridgeChar.
2. Another workaround is to use the STRING function on the LONGCHAR variable. In other words, instead of doing:
ASSIGN
v_CHARACTER_1 = FILL ("A", 15991)
v_LONGCHAR = FILL ("B", 16000).
ASSIGN
v_CHARACTER_2 = v_CHARACTER_1 + v_LONGCHAR.
Do:
ASSIGN
v_CHARACTER_1 = FILL ("A", 15991)
v_LONGCHAR = FILL ("B", 16000).
ASSIGN
v_CHARACTER_2 = v_CHARACTER_1 + STRING(v_LONGCHAR).