1 02/06/84  ebcdic_to_ascii_
 2 
 3 The ebcdic_to_ascii_ subroutine performs isomorphic (one-to-one
 4 reversible) conversion from EBCDIC to ASCII.  The input data is a
 5 string of valid EBCDIC characters.  A valid EBCDIC character is defined
 6 as a 9-bit byte with a hexadecimal value in the range
 7 00 <= hex_value <= FF (octal value in the range
 8 000 <= oct_value <= 377).
 9 
10 Calling the ebcdic_to_ascii_ subroutine is extremely efficient,
11 since conversion is performed by a single MVT instruction and the
12 procedure runs in the stack frame of its caller.
13 
14 
15 Entry points in ebcdic_to_ascii_:
16    (List is generated by the help command)
17 
18 
19 :Entry: ebcdic_to_ascii_: 02/06/84  ebcdic_to_ascii_
20 
21 Function: This entry point accepts an EBCDIC character string and
22 generates an ASCII character string of equal length.
23 
24 
25 Syntax:
26 declare ebcdic_to_ascii_ entry (char(*), char(*));
27 call ebcdic_to_ascii_ (ebcdic_in, ascii_out);
28 
29 
30 Arguments:
31 ebcdic_in
32    is the string of EBCDIC characters to be converted.  (Input)
33 ascii_out
34    is the ASCII equivalent of the input string.  (Output)
35 
36 
37 :Entry:  ea_table:  02/06/84 ebcdic_to_ascii_$ea_table
38 
39 
40 Function:  This entry point defines the 256-character translation table
41 used to perform conversion from EBCDIC to ASCII.
42 
43 
44 Syntax:
45 declare ebcdic_to_ascii_$ea_table char(256) external static;
46 
47 
48 Notes: Of the 256 valid EBCDIC characters, only 128 have ASCII
49 equivalents.  These latter 128 characters are defined in the
50 Isomorphic ASCII/EBCDIC Conversion Table (in the Subroutines manual.)
51 
52 For defined characters, the mappings implemented by the
53 ebcdic_to_ascii_ and ascii_to_ebcdic_ subroutines are isomorphic;
54 i.e., each character has a unique mapping, and mappings are
55 reversible.  An undefined (but valid) EBCDIC character is mapped into
56 the ASCII SUB (substitute) character, octal 032; the mapping of such a
57 character is anisomorphic.  The result of converting an invalid
58 character is undefined.