EZACIC14

The EZACIC14 program is an alternative to EZACIC04, which translates EBCDIC data to ASCII data. Figure 1 shows how EZACIC14 translates a byte of EBCDIC data.
Figure 1. EZACIC14 EBCDIC-to-ASCII table
  --------------------------------------------------------------                
  | ASCII      |    second hex digit of byte of EBCDIC data    |                
  | output by  |-----------------------------------------------|                
  | EZACIC14   | 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| A| B| C| D| E| F|                
  |------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 0 |00|01|02|03|9C|09|86|7F|97|8D|8E|0B|0C|0D|0E|0F|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 1 |10|11|12|13|9D|85|08|87|18|19|92|8F|1C|1D|1E|1F|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 2 |80|81|82|83|84|0A|17|1B|88|89|8A|8B|8C|05|06|07|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 3 |90|91|16|93|94|95|96|04|98|99|9A|9B|14|15|9E|1A|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 4 |20|A0|E2|E4|E0|E1|E3|E5|E7|F1|A2|2E|3C|28|2B|7C|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | 5 |26|E9|EA|EB|E8|ED|EE|EF|EC|DF|21|24|2A|29|3B|5E|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  | first  | 6 |2D|2F|C2|C4|C0|C1|C3|C5|C7|D1|A6|2C|25|5F|3E|3F|                
  | hex    |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  | digit  | 7 |F8|C9|CA|CB|C8|CD|CE|CF|CC|60|3A|23|40|27|3D|22|                
  | of     |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  | byte   | 8 |D8|61|62|63|64|65|66|67|68|69|AB|BB|F0|FD|FE|B1|                
  | of     |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  | EBCDIC | 9 |B0|6A|6B|6C|6D|6E|6F|70|71|72|AA|BA|E6|B8|C6|A4|                
  | data   |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | A |B5|7E|73|74|75|76|77|78|79|7A|A1|BF|D0|5B|DE|AE|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | B |AC|A3|A5|B7|A9|A7|B6|BC|BD|BE|DD|A8|AF|5D|B4|D7|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | C |7B|41|42|43|44|45|46|47|48|49|AD|F4|F6|F2|F3|F5|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | D |7D|4A|4B|4C|4D|4E|4F|50|51|52|B9|FB|FC|F9|FA|FF|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | E |5C|F7|53|54|55|56|57|58|59|5A|B2|D4|D6|D2|D3|D5|                
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|                
  |        | F |30|31|32|33|34|35|36|37|38|39|B3|DB|DC|D9|DA|9F|                
  --------------------------------------------------------------                
Figure 2 shows an example of EZACIC14 call instructions.
Figure 2. EZACIC14 call instruction example
    WORKING-STORAGE SECTION.
        01  OUT-BUFFER   PIC X(length of output).
        01  LENGTH       PIC 9(8) BINARY.
 
    PROCEDURE DIVISION.
         CALL 'EZACIC14' USING OUT-BUFFER LENGTH.

For equivalent PL/I and assembler language declarations, see Converting parameter descriptions.

OUT-BUFFER
A buffer that contains the following data:
  • When called, EBCDIC data
  • Upon return, ASCII data
LENGTH
Specifies the length of the data to be translated.