Kbase P104537: Errors (279) , (11678) , (12371) when trying to fill LONGCHAR with more than 32K
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/10/2007 |
|
Status: Verified
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
SYMPTOM(s):
Errors (279), (11678), (12371) when trying to fill LONGCHAR
SYSTEM ERROR: stkpush: stack overflow. Increase the -s parameter. (279)
REPLACE/CONCAT may not result in data > bytes. (11678)
REPLACE/CONCAT may not result in data > 32000 bytes (11678)
Attempt to update data exceeding 32000 (12371) after increasing -s to 20000.
Trying to fill variable with more than 32K
Using test-string = FILL("x", 30000) + FILL("y", 10000).
CAUSE:
The FILL function returns a result with the 4GL type of CHAR. So the expression FILL() + FILL() is the concatenation of two strings of type CHAR which will produce a result of type CHAR and this result can't be greater than 32K.
FIX:
Use the following to workaround this::
DEF VAR c AS LONGCHAR.
DEF VAR s AS CHAR.
c = FILL("X",30000).
c = c + FILL("Y",20000).
s = SUBSTRING(c,1000,5, "CHARACTER") + SUBSTRING(c,45000,5, "CHARACTER") .
MESSAGE "Lenght OF c = " LENGTH(c) " Example: " s VIEW-AS ALERT-BOX.