SQLOverrideCCSID400()--Override SQL CLI CCSID for i5/OS PASE


  Syntax
 #include <as400_protos.h>

 int SQLOverrideCCSID400(int newCCSID);  

  Default Public Authority: *USE

  Library: i5/OS PASE SQL CLI Library (libdb400.a)

  Threadsafe: Yes

Note: This function can only be used in an i5/OS PASE program. See i5/OS PASE for more information about creating i5/OS PASE programs.

The SQLOverrideCCSID400() function allows an i5/OS PASE program to specify a Coded Character Set Identifier (CCSID) used to convert character data arguments and results on i5/OS PASE SQL Call Level Interface (CLI) functions.


Parameters

newCCSID
(Input) Specifies the CCSID used for i5/OS PASE SQL CLI functions.

Authorities

No special authorities required.


Return Value

The function result is zero for success, or -1 for an error that is further qualified by an errno value.


Error Conditions

At least these errno values can be returned:

[EINVAL] The conversion between newCCSID and the i5/OS job default CCSID is not supported.

[ENFILE] A converter could not be opened because the maximum number of files in the system are already opened.

[EMFILE] A converter could not be opened because the maximum number of files are already opened.


Usage Notes

  1. The system automatically converts character arguments and results between the CCSID of the job or database field and a CCSID used for i5/OS PASE SQL CLI functions that defaults to the i5/OS PASE CCSID value in effect when the first i5/OS PASE SQL CLI function is called. You must call SQLOverrideCCSID400 before any other i5/OS PASE SQL CLI function, or it will have no effect on CCSID conversions.


API introduced: V4R5
Top | i5/OS PASE APIs | APIs by category