Concatenating strings in a clob column

KrisM

Member
This is something that i discovered recently.
Apparently concatenating strings into a clob column works differently in Openedge 11.6 and 11.7.
This is an example to illustrate the issue.
(I must use a longchar variable in the example because <clob> = <clob> + <string> does not compile.)

Code:
DEFINE VARIABLE uu AS INTEGER     NO-UNDO.
DEFINE VARIABLE fk AS CHARACTER   NO-UNDO.
DEFINE VARIABLE pk AS longchar   NO-UNDO.
define temp-table tt no-undo
    field t1 as int
    field t2 as clob
    index i1 is primary unique t1.

/* create with default values */
create tt.

/* concatenate a string */
pk = tt.t2.
MESSAGE "null=" (pk = ?)
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
do  uu = 70 to 80:
    pk = pk + chr(uu).
end.
tt.t2 = pk.

/* show the result */
fk = tt.t2.
MESSAGE fk
    VIEW-AS ALERT-BOX INFO BUTTONS OK.

In 11.6 this gives a correctly concatenated string.
In 11.7 this gives value NULL.
Is this something that was changed intentionally in 11.7 ?
Did i miss something here ?



Edit: I need to be more specific, version 11.7.2 is working as expected, while version 11.7.3 returns the null value.



And another edit:
Yes, this is indeed intended behaviour, as the release notes describe it as such.
I will just need to update my code.
Code:
c. LANG

PSC00364865 : Change in behavior concatenating the Unknown value (?) to a
LONGCHAR expression
================================================================================
Concatenating the Unknown value (?) to a LONGCHAR expression should result in
the Unknown value (?). In 11.7.2 and earlier releases, that did not occur. Now,
concatenating the Unknown value (?) to a LONGCHAR expression returns the
Unknown value (?).
 
Last edited:

Cringer

ProgressTalk.com Moderator
Staff member
Brings it into line with concats of ? on normal characters so makes sense, but definitely one to watch out for.
 
Top