The following table describes how to define custom localization at the data element level.
Step |
Application step |
Purpose |
Details |
---|---|---|---|
1 |
Call cs_loc_alloc. |
Allocate a CS_LOCALE structure. |
This call copies the parent context’s current localization information into the CS_LOCALE structure. |
2 |
Call cs_locale. |
Overwrite the CS_LOCALE structure with custom localization values. |
For more information about this process, see “The cs_locale routine”. |
3 |
Optionally, call cs_dt_info. |
Change datetime conversion formats in the CS_LOCALE. |
For more information about cs_dt_info, see the Open Client/Server Common Libraries Reference Manual. |
4 |
Use the CS_LOCALE |
Customize a bind variable, destination variable, or routine. |
|
5 |
Optionally call cs_loc_drop. |
Deallocate the CS_LOCALE structure. |
The application must not deallocate the CS_LOCALE until the CS_DATAFMT structure no longer references it. |