The SYGWMCXL macro generates translation tables to convert between ASCII and EBCDIC character sets. Default translation tables are generated for the following ASCII character sets:
ascii_8
cp437
cp850
iso_1
mac
roman8
Unpredictable failures can occur if the character set names are changed from lowercase to uppercase.
These default tables also provide the "base" for any character set changes or new tables you want to define. For details on the base translate tables, see Appendix B, “Translation Tables.”
You can change all attributes for user character sets. An entry is added to the translate table, specifying the appropriate character set attributes. Two examples follow for overriding defaults.
The first example, Figure A-1, shows how to use A2E and E2A macro parameters to override the ASCII-to-EBCDIC defaults. You can use uppercase or lowercase to define the parameters.
When you override the ASCII-to-EBCDIC defaults, the appropriate base table is picked up as a template for the character overrides or user-defined character sets, thus generating a default table. In the following example, the client is using us_english, which is not predefined.
The second example shows how to modify the default character set, iso_1, for Hebrew, creating a new table:
Figure A-1: Using A2E and E2A example
This example converts both of the following:
ASCII form feeds (x’0C’) and line feeds (x’0A’) to EBCDIC spaces (x’40’)
EBCDIC DELs (x’7F’) to ASCII space (x’20’)
The following example shows how to modify the default character set, iso_1, for Hebrew, creating a new table:
* These SYGWMCXL macro calls modify the iso_1 character set * to Hebrew. * SYGWMCXL TYPE=INITIAL SYGWMCXL TYPE=ENTRY, * CHARSET=(unique_name), * CHARSETBYTES=S, * A2E=(E0-41,E1-42,E2-43,E3-44,E4-45,E5-46,E6-47,E7-48,E8-* 49,E9-51,EA-52,EB-53,EC-54,ED-55,EE-56,EF-57,F0-58,F1-59* ,F2-62,F3-63,F4-64,F5-65,F6-66,F7-67,F8-68,F9-69,FA-71),* E2A=(41-E0,42-E1,43-E2,44-E3,45-E4,46-E5,47-E6,48-E7,49-* E8,51-E9,52-EA,53-EB,54-EC,55-ED,56-EE,47-EF,58-F0,59-F1* ,62-F2,63-F3,64-F4,65-F5,66-F6,67-F7,68-F8,69-F9,71-FA) SYGWMCXL TYPE=FINAL * * Assembler END is required. * END
For the CHARSET parameter, specify a unique name. This generates a new user-defined table. Provide the name to the appropriate person at the Sybase client site. The client login packet uses this name.
Copyright © 2005. Sybase Inc. All rights reserved. |