The following are examples of LOB file reference variables in ILE
RPG.
CLOB file reference example
The following
declaration:
D MY_FILE S SQLTYPE(CLOB_FILE)
results
in the generation of the following structure:
D MY_FILE DS
D MY_FILE_NL 10U
D MY_FILE_DL 10U
D MY_FILE_FO 10U
D MY_FILE_NAME 255A
BLOB and DBCLOB locators have similar syntax.
Notes: - LOB file reference variables are allowed to be declared in host structures.
- SQLTYPE, BLOB_FILE, CLOB_FILE, DBCLOB_FILE can be in mixed case.
- SQLTYPE must be between positions 44 to 80.
- When a LOB file reference is declared as a standalone host variable,
position 24 must contain the character 'S' and position 25 must be blank.
- The standalone field indicator 'S' in position 24 should be omitted when
a LOB file reference variable is declared in a host structure.
- LOB file reference variables cannot be initialized.
The pre-compiler will generate declarations for the following
file option constants. You can use these constants to set the xxx_FO variable
when you use file reference host variables.
- SQFRD (2)
- SQFCRT (8)
- SQFOVR (16)
- SQFAPP (32)