Setlob

Setlob allows you to assign a CLOB data with a string variable array and vice versa.

Syntax

 Setlob VARIA1 With VARIA2

Where:

Examples

 # Let's assign TEXT array with the content of a clob (stored in the database table [MYT])Local Char TEXT (250)(1..100)Setlob TEXT With [F:MYT]CLOB# Let's assign only the second line with the content of the clobLocal Char TEXT (250)(1..100)Setlob TEXT(2) With [F:MYT]CLOB# Let's assign the clob with the content of all the lines in TEXT.Local Char TEXTE (250)(1..100)Setlob [F:MYT]CLOB With TEXT(1..100)

Description

Setlob allows you to perform an assignment between two variables:
* One must be of type Char.
* The other of type Clbfile.

The first parameter describes the element that is assigned. The second element describes the origin of the assignment.

Both parameters can be arrays of variables. If no dimension is given, all the elements in the array are considered.

If the second parameter is an array, the origin can be:
* The whole array.
* A subarray given by a range of indexes.
* A unique element given by the corresponding index.

When the transfer is done from a CLOB to a Char array, the CLOB is cut in chunks of 'N' characters, where 'N' is the maximum character string in the array.

When a variable is set by a CLOB that contains RTF, all the texts including attributes are copied.

Associated errors

Error codeDescription
6Variable does not exist.
7Incorrect index.

See also

Char, Clbfile.