SQL_BLOB_VAL_PUT replaces one BLOB value with another contained in a buffer. The input values include the REF value of the BLOB, the database name, the buffer containing the new value and the length of the new value.
This CLI call requires the INSERT, SELECT and DELETE privileges for the BLOB table. You also require the UPDATE privilege for the slice_val column in the BLOB table.
CLI declaration in C:
void SQL_BLOB_VAL_PUT( char const *REFvalue ,char const *CatalogId ,char *Buffer ,long int *ValueLength ,struct SQLda_t *SQLda);
CLI declaration in COBOL:
IDENTIFICATION DIVISION. PROGRAM-ID. SQLbvpu IS PROTOTYPE. DATA DIVISION. LINKAGE SECTION. 01 REFvalue PIC X(237). 01 CatalogId PIC X(31). 01 Buffer. *> of any length 02 PIC X(1). 01 ValueLength PIC S9(9) COMP. COPY SQLCA. *> for group item SQLda. PROCEDURE DIVISION USING REFvalue, CatalogId, Buffer, ValueLength, SQLda. END PROGRAM SQLbvge.
REFvalue
The REF value of the BLOB. The exact structure of REF values is described on "Column definitions".
CatalogId
Unqualified name of the database in which the table is located. CatalogId
is an unqualified name (see section "Unqualified names"). If necessary, this name must be padded with blanks up to a length of 31 characters or terminated with a null byte. If you wish to use the default database name, simply enter a null byte or a string of blanks instead of the database name.
Buffer
Buffer containing the new BLOB value.
ValueLength
Length of the BLOB value. ValueLength
must be a number >= 0.
SQLda
Diagnostics area.