GET_DBCLOB_FROM_FILE
The GET_DBCLOB_FROM_FILE function returns the data from a source stream file or a source physical file.
- string-expression
- The argument must be a string expression that specifies a path and file name. The file name may be a name of a source stream file or a source physical file. For a source physical file, the string must be in the form 'library/file(member)'.
- integer
- An integer constant that specifies how to handle trailing whitespace when the specified file is
a source physical file. Valid values are:If this argument is not specified for a source physical file, the default is 0. If it is specified for a source stream file, it is ignored.
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 DBCLOB locator.
The function will read the file specified by the argument, convert the data to the double-byte CCSID associated with the default CCSID, and return it as a DBCLOB locator. The function must be run under commitment control. The locator will be freed when a COMMIT or ROLLBACK is performed.
Examples
Assign the data contained in the source stream file to host variable HV1. The data will be converted to the double-byte CCSID associated with the default CCSID.
SET :HV1 = GET_DBCLOB_FROM_FILE('/home/XML/MySchema.XSD')