1.1.17 BLOB

BLOB is a variable-length binary field of undefined maximum length.

The most common operation with BLOBs are saving files into the database and retrieving them so they can be viewed/edited/etc. In RDML and RDMLX, BLOB fields are manipulated as filenames.

Following is an example of saving a JPG into a BLOB:

#MYBLOB := 'C:\temp\mypicture.jpg'

UPDATE FIELDS(#MYBLOB) IN_FILE(FILE1)

 

Please review the general 1.1.1 Field Type Considerations.

Field Definition Rules

Rules for defining a BLOB in the repository are:

Length

Length cannot be specified. No decimals.

Valid Keyboard Shift

Blanks

Allowed Attributes

AB, ASQN, CS, FE, LC, ND, RA, RL, RLTB.

Note: LC and ASQN must always be defined and cannot be removed.

Edit Mask

Not allowed.

Default

*SQLNULL. ASQN will be enabled by default.

Field Definition Notes

Usage Rules

Partition Type

RDMLX Enabled Partition

Files

BLOBS may only be used in RDMLX Files. BLOB fields may be used as real fields.  BLOBS must not be used as key fields.

Logical Views

BLOBS may not be used as key fields.

Virtual Fields

Not applicable.

Predetermined Join Fields

Not applicable.

RDML Commands

If a BLOB or CLOB field is used, keep in mind that the field contains a filename, not the actual data in the object. In RDML and RDMLX, LANSA LOB fields will be manipulated as filenames. It is only in database IO commands that the BLOB or CLOB actual data itself is handled by reading from or writing to the named file.

Built-In Functions

When used in Built-In Functions, BLOBs are classified as their own types and are not valid for numeric or alpha arguments.

Special Values

*SQLNULL, *NAVAIL, *REMEMBERED_VALUE, *EMPTY

Conversion

BLOBs are treated as file pointers and do not support conversion to a Numeric or Date/Time field type. Refer to Field Type Conversions.

Usage Notes

Platform Considerations

Tips & Techniques

Also See

1.1.18 CLOB