Declaration of large object locator type host variables in COBOL embedded SQL applications
Large object (LOB) locator
type host variables that you declare in your embedded COBOL application
are treated as if they were declared in a COBOL program. You can use
host variables to exchange data between the embedded application and
the database manager.
The syntax for declaring large object (LOB) locator host variables in COBOL is:
LOB locator host variable considerations:
- SQL TYPE IS, BLOB-LOCATOR, CLOB-LOCATOR, DBCLOB-LOCATOR can be either uppercase, lowercase, or mixed.
- Initialization of locators is not permitted.
BLOB locator example (other LOB locator types are similar):
Declaring:
01 MY-LOCATOR USAGE SQL TYPE IS BLOB-LOCATOR.
Results in the generation of the following declaration:
01 MY-LOCATOR PIC S9(9) COMP-5.