IBM Systems - Iseries
Total Page:16
File Type:pdf, Size:1020Kb
IBM Systems - iSeries National Language Support APIs Version 5 Release 4 IBM Systems - iSeries National Language Support APIs Version 5 Release 4 Note Before using this information and the product it supports, be sure to read the information in “Notices,” on page 137. Sixth Edition (February 2006) This edition applies to version 5, release 4, modification 0 of IBM i5/OS (product number 5722-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. © Copyright International Business Machines Corporation 1998, 2006. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents National Language Support APIs . .1 Error Messages . .20 APIs . .1 Retrieve Default CCSID (QLGRTVDC) . .21 National Language Support-related APIs . .1 Authorities and Locks . .21 UniNextCompChar()—Advance to Next Composite Required Parameter Group . .21 Character Sequence API . .2 Error Messages . .21 Authorities and Locks . .2 Retrieve Language IDs (QLGRTVLI) API . .21 Parameters . .2 Authorities and Locks . .22 Return Value . .3 Required Parameter Group . .22 Error Conditions . .3 RTVL0100 Format . .22 UniQueryCompCharLen()—Composite Character Field Descriptions . .23 Sequence Code Element Count API . .3 Error Messages . .23 Authorities and Locks . .3 Retrieve Language Information (QLGRLNGI) API 23 Parameters . .4 Authorities and Locks . .24 Return Value . .4 Required Parameter Group . .24 Error Conditions . .4 LNGI0100 Format . .24 Convert Case (QLGCNVCS, QlgConvertCase) API . .4 LNGI0110 Format . .25 Authorities and Locks . .5 Field Descriptions . .25 Required Parameter Group . .5 Format of the Returned Information . .25 Format of Request Control Block . .5 Field Descriptions . .26 Field Descriptions . .6 Error Messages . .27 Error Messages . .7 Retrieve Locale Information (QLGRTVLC, Convert Sort Sequence Table (QLGCNVSS) API . .8 QlgRetrieveLocaleInformation) API . .27 Authorities and Locks . .8 Authorities and Locks . .27 Required Parameter Group . .8 Required Parameters . .28 Error Messages . .9 Locale Category Keys . .29 QlgCvtTextDescToDesc()—Convert Text Descriptor Locale Category Key Descriptions . .29 API . .9 Format of the Locale Information . .30 Authorities and Locks . .9 Locale Category Formats . .30 Parameters . .9 LC_CTYPE - Character Classification and Return Value . .11 Conversion Format . .31 Error Conditions . .11 LC_COLLATE - Character Collation Format . .42 Usage Notes . .12 LC_TIME - Date and Time Formatting Format. .50 UniQueryCompChar()—Number of Composite LC_NUMERIC - Numeric and Non-Monetary Character Sequences API . .13 Formatting Format . .52 Authorities and Locks . .14 LC_MESSAGES - Affirmative and Negative Parameters . .14 Responses Format . .53 Return Value . .14 LC_MONETARY - Monetary Related Numeric Error Conditions . .14 Formatting Format . .53 Retrieve CCSID Data (QLGRTVCD) . .14 LC_TOD - Time Zone Information Format . .54 Authorities and Locks . .15 LC_ALL - All Locale Categories . .55 Required Parameter Group . .15 Field Descriptions . .55 Format of Receiver Variable . .16 Error Messages . .64 Field Descriptions . .16 Retrieve Sort Sequence Table (QLGRTVSS) API . .64 Error Messages . .16 Authorities and Locks . .65 Retrieve CCSID Text (QLGRTVCT) API . .16 Required Parameter Group . .65 Authorities and Locks . .17 RSST0100 Format . .66 Required Parameter Group . .17 RSST0200 Format . .67 Format of the Generated Information . .17 Field Descriptions . .67 Field Descriptions . .18 Layout of a Returned UCS-2 Sort Sequence Table 69 Error Messages . .18 Error Messages . .70 Retrieve Country or Region Identifiers (QLGRTVCI) Scan String for Mixed Data (QLGSCNMX) API . .70 API . .19 Authorities and Locks . .71 Authorities and Locks . .19 Required Parameter Group . .71 Required Parameter Group . .19 Error Messages . .71 Format of the Generated Information . .20 Sort (QLGSORT) API . .72 Field Descriptions . .20 Authorities and Locks . .74 © Copyright IBM Corp. 1998, 2006 iii Required Parameter Group . .74 Related Information . 111 Optional Parameter Group . .75 iconv_close()—Code Conversion Deallocation API 111 Format of Request Control Block . .75 Authorities and Locks . 111 Format of Returned Records Feedback Parameters . 111 Information . .77 Return Value . 111 Field Descriptions . .77 Error Conditions . 111 Buffer Layout Examples . .85 Usage Notes . .112 Error Messages . .87 Related Information . .112 Sort Input/Output (QLGSRTIO) API . .88 Convert Data (QDCXLATE) API . .112 Authorities and Locks . .88 Authorities and Locks . .113 Required Parameter Group . .88 Required Parameter Group . .113 Optional Parameter Group . .89 Optional Parameter Group . .113 Format of Request Control Block . .90 Error Messages . .115 Format of Output Data Information . .90 Character Data Representation Architecture Format of Returned Records Feedback (CDRA) APIs . .115 Information . .90 Convert a Graphic Character String (CDRCVRT, Field Descriptions . .90 QTQCVRT) API . .116 Error Messages . .92 Authorities and Locks . .117 QlgTransformUCSData()—Transform UCS Data API 93 Required Parameter Group . .117 Parameters . .93 Feedback Codes and Conditions . .118 Authorities and Locks . .94 Usage Notes . 120 Return Value . .94 Get CCSID for Normalization (CDRGCCN, Usage Notes: . .95 QTQGCCN) API . 120 Error Messages . .95 Authorities and Locks . 120 Truncate Character Data (QLGTRDTA) API . .96 Required Parameter Group . 120 Authorities and Locks . .96 Feedback Codes and Conditions . 121 Required Parameter Group . .96 Usage Notes. 121 Error Messages . .98 Get Control Function Definition (CDRGCTL, QtqValidateCCSID()—Validate CCSID API . .98 QTQGCTL) API . 122 Authorities and Locks . .98 Authorities and Locks . 122 Parameters . .98 Required Parameter Group . 122 Return Value . .98 Feedback Codes and Conditions . 124 Validate Language ID (QLGVLID) API . .99 Usage Notes. 124 Authorities and Locks . .99 Get Encoding Scheme, Character Set, and Code Required Parameter Group . .99 Page Elements (CDRGESP, QTQGESP) API . 125 Error Messages . .99 Authorities and Locks . 125 Data Conversion APIs . .99 Required Parameter Group . 125 iconv()—Code Conversion API . 100 Feedback Codes and Conditions . 126 Authorities and Locks . 101 Usage Notes. 126 Parameters . 101 Get Related Default CCSID (CDRGRDC, Restrictions . 102 QTQGRDC) API . 126 Return Value . 102 Authorities and Locks . 127 Error Conditions . 102 Required Parameter Group . 127 Usage Notes . 104 Feedback Codes and Conditions . 127 Related Information . 104 Usage Notes. 128 iconv_open()—Code Conversion Allocation API 104 Get Short Form (CCSID) from Specified ES and Authorities and Locks . 105 (CS, CP) Pair (CDRSCSP, QTQSCSP) API . 128 Parameters . 105 Authorities and Locks . 129 Format of fromcode and tocode . 105 Required Parameter Group . 129 Field Descriptions . 105 Feedback Codes and Conditions . 130 Return Value . 107 Usage Notes. 130 Error Conditions . 107 Get Short Form with Maximal CS for Specified ES Usage Notes . 107 and CP (CDRSMXC, QTQSMXC) API . 130 Related Information . 107 Authorities and Locks . 131 QtqIconvOpen()—Code Conversion Allocation API 108 Required Parameters . 131 Authorities and Locks . 108 Feedback Codes and Conditions . 132 Parameters . 108 Usage Notes. 132 Format of QtqCode_T . 108 Get Short Form with Maximal CS for Specified ES Field Descriptions . 109 and CP (QTQSMXC2) API . 133 Return Value . .110 Authorities and Locks . 133 Error Conditions . .110 Required Parameters . 133 iv IBM Systems - iSeries: National Language Support APIs Feedback Codes and Conditions . 134 Appendix. Notices . 137 Usage Notes. 134 Programming Interface Information . 138 Resolve Client Server CCSID (QTQRCSC) API . 135 Trademarks . 139 Authorities and Locks . 135 Terms and Conditions . 140 Required Parameters . 135 Feedback Codes and Conditions . 136 Usage Notes . 136 Contents v vi IBM Systems - iSeries: National Language Support APIs National Language Support APIs The national language support APIs include: v “National Language Support-related APIs” v “Data Conversion APIs” on page 99 v “Character Data Representation Architecture (CDRA) APIs” on page 115 APIs by category APIs These are the APIs for this category. National Language Support-related APIs The national language support-related APIs work with the national language support (NLS) functions. The NLS-related APIs that work with UCS2 (Universal Multiple-Octet Coded Character Set with 16 bits per character) character sets are: v Advance to Next Composite Character Sequence (UniNextCompChar()) API v Composite Character Sequence Code Element Count (UniQueryCompCharLen()) API v Convert Case (QLGCNVCS, QlgConvertCase) API v Number of Composite Character Sequences (UniQueryCompChar()) API v Retrieve Locale Information (QLGRTVLC, QlgRetrieveLocaleInformation) API v Transform UCS Data (QlgTransformUCSData()) API The NLS-related APIs are: v “UniNextCompChar()—Advance to Next Composite Character Sequence API” on page 2 (UniNextCompChar()) locates the next non-combining character in a string. v “UniQueryCompCharLen()—Composite Character Sequence Code Element Count API” on page 3 (UniQueryCompCharLen()) computes the number of code elements in a composite character sequence. v “Convert Case (QLGCNVCS, QlgConvertCase) API” on page 4 (QLGCNVCS, QlgConvertCase) provides case conversion to either uppercase or lowercase. v “Convert Sort Sequence