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_OBJ_CREAT2 - SQLboc2

SQL_BLOB_OBJ_CREATE2 creates a new BLOB and outputs the generated REF value. The input parameters include the database name, the REF value of the class to which the new BLOB is to belong, and an interval for the object number. You can also specify the REF value of an existing object of this class. The following values are entered in the BLOB table when a new object is created:

  • The BLOB is assigned an object number that is unique within that class. This object number is assigned within the specified interval in accordance with a specific algorithm. This ensures that the object numbers are distributed equally over the specified interval when there are multiple SQL_BLOBOBJ_CREAT2 calls.

  • The BLOB attributes UPDATED and CREATED are assigned the current time stamp. All other attributes are set in accordance with their default values.

The BLOB value of the newly created BLOB has the length 0.

This CLI call requires the INSERT and SELECT privileges for BLOB tables, as well as the UPDATE privilege for the obj_ref column of the BLOB table.

CLI declaration in C:

void SQL_BLOB_OBJ_CREAT2( char *REFvalue
          ,char const *CatalogId
          ,long int *MinObjectNmbr
          ,long int *MaxObjectNmbr
          ,struct SQLda_t *SQLda);

CLI-Deklaration in COBOL:

IDENTIFICATION DIVISION.
PROGRAM-ID. SQLboc2 IS PROTOTYPE.
DATA DIVISION.
LINKAGE SECTION.
   01 REFvalue PIC X(237).
   01 CatalogId PIC X(31).
   01 MinObjectNmbr PIC S9(9) COMP.
   01 MaxObjectNmbr PIC S9(9) COMP.
   COPY SQLCA.     *> for group item SQLda.
PROCEDURE DIVISION USING REFvalue, MinObjectNmbr, MaxObjectNmbr, CatalogId, 
          SQLda.
END PROGRAM SQLboc2.


REFvalue

REF value of the class or of an existing object from the same class. 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.

MinObjectNmbr

Minimum value for the object number (must be >= 1 ).

MaxObjectNmbr

Maximum value for the object number (must be greater than or equal to the minimum value).

SQLda

Diagnostics area.