Customizing EBCDIC-to-ASCII code page mapping

EBCDIC-to-ASCII mapping tables convert an EBCDIC character specified in an application data stream into an ASCII character code value (for that same character).

The EBCDIC-to-ASCII mapping table used for a given ASCII printer depends on the manufacturer, type, and model configured for the printer. Different types of ASCII printers support different ASCII code pages. The code page in use at any time is determined by a command to select the ASCII code page.

You can customize the EBCDIC-to-ASCII mapping that should be used for an ASCII printer. You can customize the mapping to replace the entire ASCII code page mapped to an EBCDIC code page. For example, the U.S. English EBCDIC code page 037 normally maps to the ASCII code page 437. You could map EBCDIC code page 037 to an ASCII code page other than 437 (such as ASCII code page 850).

The following code page mapping tables are available on the operating system for use by the host print transform function. The default mapping table is the mapping table used if you do not override the default table using a customization object.

EBCDIC code page used Default ASCII code page Alternate ASCII code page Alternate ASCII code page Alternate ASCII code page Alternate ASCII code page Alternate ASCII code page Alternate ASCII code page
 037  437  850  860  863 1051    
 273  850  437 1051        
 277  850  865 1051        
 278  850  437  865 1051      
 280  850  437 1051        
 282  850  860 1051        
 284  850  437 1051        
 285  850  437 1051        
 297  850  437 1051        
 420  864 1051          
 423  851 1051          
 424  856  862 1051        
 500  850  437  860  861  863  865 1051
 838  874 1051          
 870  852 1051          
 871  850  437  861 1051      
 875  869 1051          
 880  850 1051          
 905  857 1051          
1025  850 1051          
1026  857 1051          
In addition, you can map the EBCDIC symbols code page (code page 259) to an ASCII code page. If you configure a printer to support the ASCII symbols code page (code page 899), the complete mapping from EBCDIC code page 259 to ASCII code page 899 is used. Otherwise, a partial mapping is done from EBCDIC code page 259 to the currently defined ASCII code page. The partial mapping can be done from EBCDIC code page 259 to any of the following ASCII code pages:
437 850 851 852
856 857 860 861
862 863 864 865
869 874 899 1051

You can also customize EBCDIC-to-ASCII mapping for an individual code point within an EBCDIC code page. When you customize the mapping for an individual code point, though, you must indicate data values for every code point within the code page. You cannot just indicate the data value for the code point that you want to customize.

You begin the syntax for various mapping tables with an EBCDIC-to-ASCII Mapping Table (EBCASCTBL) tag, and end the syntax with an End EBCDIC-to-ASCII Mapping Table (EEBCASCTBL) tag. The EBCASCTBLE tags fall between the start and end tags to define the EBCDIC-to-ASCII mapping using the DATA parameter.

If you use the EBCDIC-to-ASCII definition tags, your source could look something like this:
:EBCASCTBL.
     :EBCASCTBLE...
               .
               .
     :EBCASCTBLE...
               .
               .
:EEBCASCTBL.