Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SQL_BLOB_VAL_GET - SQLbvge

SQL_BLOB_VAL_GET reads an entire BLOB value in one go. The input parameters include the REF value of the BLOB, the database name, the buffer to which the value is to be written and the length of this buffer.

This CLI call requires the SELECT privilege for the BLOB table.

CLI declaration in C:

void SQL_BLOB_VAL_GET( char const *REFvalue
          ,char const *CatalogId
          ,char *Buffer
          ,long int const *BufferLength
          ,long int *ValueLength
          ,struct SQLda_t *SQLda);

CLI declaration in COBOL:

IDENTIFICATION DIVISION.
PROGRAM-ID. SQLbvge 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 BufferLength PIC S9(9) COMP.
   01 ValueLength PIC S9(9) COMP.
   COPY SQLCA.     *> for group item SQLda.
PROCEDURE DIVISION USING REFvalue, CatalogId, Buffer, BufferLength, 
          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 to which the BLOB value is written.

BufferLength

Length of the buffer in bytes. BufferLength must be a number >= 0.

ValueLength

Length of the BLOB value. If this is greater than the value specified in BufferLength, the buffer will contain only the first few bytes of the BLOB value (up to the length BufferLength). Otherwise, the first few bytes of the buffer will contain the entire BLOB value.

SQLda

Diagnostics area.