You can do the following with LONGCHAR values:

  • Display and update LONGCHAR in a large editor. The default is no display.
  • Use LONGCHAR variables as parameters and return values in procedures, user-defined functions, and methods. Note that, as is also the case with MEMPTR values, LONGCHAR return values from user-defined functions are not allowed to be passed from an application server to a client.
  • Use the COPY-LOB statement to copy data from a CLOB to a LONGCHAR so that you can manipulate the CLOB data.
  • The following tables list the ABL elements that work with LONGCHAR variables. For example, you can get the character length of a LONGCHAR by using LENGTH with the character (default) option. Or you can SUBSTRING a LONGCHAR with the offset given in characters, not bytes. The particulars of which string manipulation functions apply to LONGCHAR values vary for each function and for particular characteristics of the LONGCHAR. For example, most functions which alter the string only apply to LONGCHAR values that are in -cpinternal. All functions which deal with LONGCHAR values and have offset and length input parameters use character offsets and lengths, not byte values. For more information on these ABL elements, see the ABL Reference.
Table 1. ABL operators that work with LONGCHAR variables
Operators
Concatenation (+) Equal (EQ or =) Less than (LT or <)
Assignment (=) Greater than (GT or >) Less than or equal (LE or >=)
BEGINS Greater than or equal (GT or >=)
MATCHES Not equal (NE or <>)
Table 2. ABL functions that work with LONGCHAR variables
Functions
BASE64-DECODE INDEX R-INDEX
BASE64-ENCODE IS-CODEPAGE-FIXED REPLACE
CAPS LC RIGHT-TRIM
CODEPAGE-CONVERT LEFT-TRIM SHA1-DIGEST
COMPARE LENGTH SUBSTITUTE
ENCRYPT LOOKUP SUBSTRING
ENTRY MD5-DIGEST TRIM
GENERATE-PBE-KEY NORMALIZE
GET-CODEPAGE NUM-ENTRIES
Table 3. ABL statements that work with LONGCHAR variables
Statements
ASSIGN EXPORT OVERLAY
COPY-LOB FIX-CODEPAGE PUT-STRING
DEFINE PARAMETER FUNCTION SUBSTRING
DEFINE VARIABLE IMPORT VAR
ENTRY METHOD
Table 4. ABL attributes that work with LONGCHAR variables
Attributes
FRAGMENT SYMMETRIC-ENCRYPTION-KEY
Table 5. ABL methods that work with LONGCHAR variables
Methods
DECLARE-NAMESPACE() READ-XMLSCHEMA() WRITE-DATA-ELEMENT()
END-ELEMENT() SAVE() WRITE-EMPTY-ELEMENT()
GET-CGI-LONG-VALUE() SET-INPUT-SOURCE() WRITE-ENTITY-REF()
GET-NODE() SET-OUTPUT-DESTINATION() WRITE-EXTERNAL-DTD()
GET-SERIALIZED() SET-PARAMETER() WRITE-FRAGMENT()
INSERT-ATTRIBUTE() SET-SERIALIZED() WRITE-PROCESSING- INSTRUCTION()
LOAD() START-ELEMENT() WRITE-XML()
LONCHAR-TO-NODE-VALUE() WRITE-CDATA() WRITE-XML-SCHEMA()
NODE-VALUE-TO-LONGCHAR() WRITE-CHARACTERS()
READ-XML() WRITE-COMMENT()