
The GET_CLOB_FROM_FILE function returns the data from a source stream file or a source physical file.
| 0 | whitespace is returned as it exists in the file |
| 1 | trailing whitespace (blanks) is removed except for the first trailing blank |
The result of the function is a CLOB locator.
The function will read the file specified by the argument, convert the data to the default job CCSID, and return it as a CLOB locator. The function must be run under commitment control. The locator will be freed when a COMMIT or ROLLBACK is performed.
Assign the data contained in the source file to host variable HV1. The data will be converted to the default job CCSID and trailing blanks from each line of the source file will be removed.
SET :HV1 = GET_CLOB_FROM_FILE('MYLIB/MYFILE(MYMBR)',1), NULL)
