Version 2 Release 3 z/OS - IBM

z/OS Version 2 Release 3

Unicode Services User's Guide and Reference

IBM

SA38-0680-30

Note Before using this information and the product it supports, read the information in "Notices" on page 605.

This edition applies to Version 2 Release 3 of z/OS (5650-ZOS) and to all subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2019-02-16 ? Copyright International Business Machines Corporation 2001, 2017. US Government Users Restricted Rights ? Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

List of Figures....................................................................................................... ix

List of Tables........................................................................................................ xi

About this information......................................................................................... xv

Who should use this information............................................................................................................... xv How this information is organized..............................................................................................................xv

Overview of contents............................................................................................................................ xv Syntax diagrams...................................................................................................................................xvi z/OS information........................................................................................................................................ xvi

How to send your comments to IBM.................................................................... xvii

If you have a technical problem............................................................................................................... xvii

Summary of changes......................................................................................... xviii

Summary of changes............................................................................................................................... xviii Summary of changes............................................................................................................................... xviii z/OS Version 2 Release 1 summary of changes......................................................................................xviii

Part 1. Introduction to the Unicode Standard and z/OS Unicode Services................ 1

Chapter 1. Introduction to the Unicode Standard.......................................................................................3 What is the Unicode Standard?.............................................................................................................. 3 The Unicode standard............................................................................................................................ 3 How the Unicode Standard relates to prior standards such as ASCII and EBCDIC............................. 4 Evolving standards based on limited platforms............................................................................... 4 Historical simplicity creates modern complexity.............................................................................4 Character sets for many characters................................................................................................. 4 Stateful encodings............................................................................................................................ 5 Why the Unicode Standard?................................................................................................................... 5 What is z/OS Unicode Services?.............................................................................................................6 z/OS support for the Unicode Standard application programming interfaces..................................... 6 Character conversion........................................................................................................................ 6 Case conversion................................................................................................................................ 7 Normalization.................................................................................................................................... 7 Collation............................................................................................................................................ 7 Stringprep..........................................................................................................................................7 Bidirectional transformation.............................................................................................................7 Conversion information service........................................................................................................ 8 Dynamic locale service..................................................................................................................... 8

Part 2. Application programmer information...........................................................9

Chapter 2. About the application programming interfaces ..................................................................... 11 z/OS Unicode environment.................................................................................................................. 11 General concepts when using the z/OS Unicode Services programming interfaces......................... 11 Conversion handle use......................................................................................................................... 13 Sample code......................................................................................................................................... 14 Characteristics for the caller ............................................................................................................... 14 Linkage conventions.............................................................................................................................14 Bidi function..........................................................................................................................................14 Related services................................................................................................................................... 14

iii

Chapter 3. Character conversion...............................................................................................................15 Calling the character conversion services........................................................................................... 15 Calling the bidi conversion services.....................................................................................................18 Restrictions for the calling environment..............................................................................................19 Using the C interface............................................................................................................................ 19 Mapping of parameters in C................................................................................................................. 19 31-bit mapping............................................................................................................................... 20 64-bit mapping............................................................................................................................... 22 Using the HLASM interface.................................................................................................................. 24 Mapping of parameters for AMODE (31)..............................................................................................25 Description of parameters in area CUNBCPRM................................................................................... 27 Mapping of parameters for AMODE (64)..............................................................................................34 Description of parameters in area CUN4BCPR....................................................................................37 Mapping of the extended bidi parameter area.................................................................................... 44 AMODE(31)..................................................................................................................................... 44 Description of parameters in area CUNBDPRM............................................................................. 47 AMODE(64)..................................................................................................................................... 60 Description of parameters in area CUN4BDPR.............................................................................. 63 Handling a target buffer overflow ....................................................................................................... 75 Sample programs................................................................................................................................. 77

Chapter 4. Case conversion....................................................................................................................... 79 Calling the case conversion services................................................................................................... 80 Restrictions for the calling environment..............................................................................................81 Using the C interface............................................................................................................................ 81 Mapping of parameters in C................................................................................................................. 81 31-bit mapping............................................................................................................................... 81 64-bit mapping............................................................................................................................... 82 Using the HLASM interface.................................................................................................................. 83 Mapping of parameters for AMODE (31)..............................................................................................84 Description of parameters in area CUNBAPRM...................................................................................85 Mapping of parameters for AMODE (64)..............................................................................................89 Description of parameters in area CUN4BAPR....................................................................................91 Sample programs................................................................................................................................. 95

Chapter 5. Normalization...........................................................................................................................97 Calling the normalization service.........................................................................................................97 Handling a work buffer overflow ................................................................................................... 98 Restrictions for the calling environment..............................................................................................98 Using the C interface............................................................................................................................ 98 Mapping of parameters in C................................................................................................................. 99 31-bit mapping............................................................................................................................... 99 64-bit mapping............................................................................................................................... 99 Using the HLASM interface................................................................................................................ 100 Mapping of parameters for AMODE (31)........................................................................................... 101 Description of parameters in area CUNBNPRM................................................................................ 102 Mapping of parameters for AMODE (64)........................................................................................... 105 Description of parameters in area CUN4BNPR................................................................................. 106 Sample programs............................................................................................................................... 109

Chapter 6. Collation................................................................................................................................. 111 Calling the collation service............................................................................................................... 112 Restrictions for the calling environment........................................................................................... 116 Using the C interface.......................................................................................................................... 116 Mapping of parameters in C............................................................................................................... 120 31-bit mapping............................................................................................................................. 120 64-bit mapping............................................................................................................................. 122

iv

Mapping of constants in C..................................................................................................................123 Using the HLASM interface................................................................................................................ 125 Mapping of parameters for AMODE (31)........................................................................................... 127 Description of parameters in area CUNBOPRM................................................................................ 131 Mapping of constants for AMODE (31).............................................................................................. 144 Mapping of parameters for AMODE (64)........................................................................................... 146 Description of parameters in area CUN4BOPR................................................................................. 149 Mapping of constants for AMODE (64).............................................................................................. 162 Sort key vector format........................................................................................................................163 Work buffer length considerations.................................................................................................... 165 Target buffer length considerations...................................................................................................165 Sample programs............................................................................................................................... 166

Chapter 7. Bidi transformation................................................................................................................169 Calling bidi transformation service.................................................................................................... 169 Using the C interface.......................................................................................................................... 170 Mapping of parameters in C............................................................................................................... 170 31-bit mapping............................................................................................................................. 170 64-bit mapping............................................................................................................................. 171 Using the HLASM interface................................................................................................................ 171 Mapping of parameters for AMODE (31)........................................................................................... 172 Description of parameters in area CUNBBPRM.................................................................................173 Mapping of parameters for AMODE (64)........................................................................................... 174 Description of parameters in area CUN4BBPR................................................................................. 175 Character conversion service and the new B technique...................................................................177

Chapter 8. Stringprep conversion........................................................................................................... 179 Calling the stringprep services.......................................................................................................... 179 Using the C interface.......................................................................................................................... 179 Mapping of parameters in C............................................................................................................... 180 31-bit mapping............................................................................................................................. 180 64-bit mapping............................................................................................................................. 181 Using the HLASM interface................................................................................................................ 181 Mapping of parameters for AMODE (31)........................................................................................... 182 Description of parameters in area CUNBPPRM.................................................................................184 Mapping of parameters for AMODE (64)........................................................................................... 186 Description of parameters in area CUN4BPPR..................................................................................187 Sample programs............................................................................................................................... 189

Chapter 9. Conversion information service.............................................................................................191 Calling the conversion information service....................................................................................... 191 Restrictions for the calling environment........................................................................................... 192 Using the C interface.......................................................................................................................... 192 Mapping of parameters in C............................................................................................................... 192 31-bit mapping............................................................................................................................. 192 64-bit mapping............................................................................................................................. 195 Using the HLASM interface................................................................................................................ 198 Mapping of parameters for AMODE (31)........................................................................................... 202 Description of parameters in area CUNBIPRM..................................................................................207 Mapping of parameters for AMODE (64)........................................................................................... 216 Description of parameters in area CUN4BIPR.................................................................................. 221 Sample programs............................................................................................................................... 229

Chapter 10. Dynamic locale service........................................................................................................231 Adding and removing locales in the z/OS Unicode environment......................................................231 Mapping of parameters in C............................................................................................................... 231 31-bit mapping............................................................................................................................. 231 64-bit mapping............................................................................................................................. 232

v

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download