Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Concept of the SESAM CLI

The SESAM CLI (Call Level Interface) is a procedural interface which is primarily used to access BLOBs (Binary Large Objects). There is also another CLI call at present which you can use to define attribute values for dynamic INSERT statements.

A BLOB is a sequence of bytes of variable length, up to a maximum of 231-1 bytes. SESAM/SQL allows you to store BLOBs in databases in the form of persistent objects. You can then display and manipulate them outside SESAM/SQL using special programs, such as Microsoft TM Word for example.

The value of a BLOB is referred to simply as a BLOB value. BLOBs can only be stored in special tables, known as BLOB tables. These are created using the SQL statement CREATE TABLE table OF BLOB (see "CREATE TABLE - Create base table"). The BLOB values of a BLOB table form the objects of a particular class.

When a BLOB is created, its value and assigned attributes are written to a BLOB table. In addition, a unique REF value is created for referencing the BLOB throughout its lifetime. This REF value can be stored in the REF column of any base table. The BLOB value itself is stored piecemeal in several rows of the BLOB table. This storage method allows for efficient sequential access to BLOB values.

The attributes of a particular BLOB consist of properties defined by the user and properties assigned to the object by SESAM/SQL (see section "CREATE TABLE - Create base table" ).

The SESAM CLI allows you to address BLOBs, their classes and attributes, BLOB values and sequences of BLOB values. The individual CLI calls are described in detail in the section "SESAM CLI calls".

The contents of BLOB values are processed not in SESAM/SQL, but in object-specific programs, such as MS Word in the case of Word documents. When transferring BLOB values from SESAM/SQL to a BS2000 file, for instance, you have two options:

  • You can use SQL_BLOB_VAL_GET to read the entire BLOB value from a buffer.

  • You can use the command sequence SQL_BLOB_VAL_OPEN,
    SQL_BLOB_VAL_FETCH and SQL_BLOB_VAL_CLOSE to read out the individual segments of the BLOB value one by one (see the section "Alphabetical reference section").

    There is a variant with the suffix _STATELESS for each of the functions SQL_BLOB_VAL_OPEN, SQL_BLOB_VAL_FETCH, SQL_BLOB_VAL_STOW and SQL_BLOB_VAL_CLOSE. This set of functions can be used to process BLOBs step-by-step even if UTM dialog step changes occur. The interfaces of these functions are described in the files sqlblox.h (for C) and SQLBLOX (for COBOL).

The demonstration database of SESAM/SQL (see the “ Core manual”) contains tables for managing BLOBs. There you will also find an ESQL program with C functions for editing these BLOB objects.