sqludf_ccsid()--SQL LOB locator ccsid
![Start of change](v7r2delta.gif)
Syntax
#include <sqludf.h> extern int SQL_API_FN sqludf_ccsid( udf_locator * udfloc_p, long * return_ccsid_p)Service Program Name: QSYS/QSQAPIS
Default Public Authority: *USE
Threadsafe: Yes
The sqludf_ccsid() function returns the ccsid of the LOB data represented by a LOB locator.
Parameters
- udfloc_p
- (Input) Pointer to the LOB locator value.
- return_ccsid_p
- (Input/Output) Pointer to the ccsid of the LOB data represented by the LOB locator.
Authorities
No authorization is required.
Return Value
sqludf_ccsid()returns an integer. Possible values are:
- 0
- sqludf_ccsid() was successful. The
information is returned in the buffer pointed to by return_ccsid_p.
- -3
- squdf_ccsid() was not successful. An invalid parameter was passed into the function.
- -423
- squdf_ccsid() was not successful. The udfloc_p parameter
points to an invalid locator value.
- -901
- sqludf_ccsid() was not successful. An SQL system error has occurred.
- -7034
- sqludf_ccsid() was not successful. LOB locators are not allowed with COMMIT(*NONE).
Error Messages
Message ID | Error Message Text |
---|---|
SQL7034 D | LOB locators are not allowed with COMMIT(*NONE). |
SQL0901 D | SQL system error. |
SQL0952 D | Processing of the SQL statement ended. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Usage Notes
- This API is used to find out the ccsid of a LOB value when it receives a locator.
Related Information
- sqludf_append()--SQL LOB append locator
- sqludf_create_locator()--SQL LOB create locator
- sqludf_create_locator_with_ccsid()--SQL LOB create locator with ccsid
- sqludf_free_locator()--SQL LOB free locator
- sqludf_length()--SQL LOB locator length
- sqludf_substr()--SQL LOB substring locator
![End of change](v7r2deltaend.gif)
API introduced: V7R2