LOB locators in ILE RPG applications that use SQL

The following are examples of LOB locators in ILE RPG.

BLOB locator example

The following declaration:

D MYBLOB          S          SQLTYPE(BLOB_LOCATOR)

results in the following generation:

D MYBLOB          S          10U

CLOB and DBCLOB locators have similar syntax.

Notes:
  1. LOB locators are allowed to be declared in host structures.
  2. SQLTYPE, BLOB_LOCATOR, CLOB_LOCATOR, DBCLOB_LOCATOR can be in mixed case.
  3. SQLTYPE must be between positions 44 to 80.
  4. When a LOB locator is declared as a standalone host variable, position 24 must contain the character 'S' and position 25 must be blank.
  5. The standalone field indicator S in position 24 should be omitted when a LOB locator is declared in a host structure.
  6. LOB locators cannot be initialized.