z/OS Communications Server: IP IMS Sockets Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


EZACIC05

z/OS Communications Server: IP IMS Sockets Guide
SC27-3653-00

The EZACIC05 program is used to translate ASCII data to EBCDIC data. EBCDIC data is required by COBOL, PL/I, and assembly language programs. Figure 1 shows how EZACIC05 translates a byte of ASCII data.

Figure 1. EZACIC05 ASCII-to-EBCDIC table
  --------------------------------------------------------------                
  | EBCDIC     |    second hex digit of byte of ASCII data     | 
  | output by  |-----------------------------------------------| 
  | EZACIC05   | 0| 1| 2| 3| 4| 5| 6| 7| 8| 9| A| B| C| D| E| F| 
  |------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 0 |00|01|02|03|37|2D|2E|2F|16|05|25|0B|0C|0D|0E|0F| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 1 |10|11|12|13|3C|3D|32|26|18|19|3F|27|22|1D|35|1F| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 2 |40|5A|7F|7B|5B|6C|50|7D|4D|5D|5C|4E|6B|60|4B|61| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 3 |F0|F1|F2|F3|F4|F5|F6|F7|F8|F9|7A|5E|4C|7E|6E|6F| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 4 |7C|C1|C2|C3|C4|C5|C6|C7|C8|C9|D1|D2|D3|D4|D5|D6| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | 5 |D7|D8|D9|E2|E3|E4|E5|E6|E7|E8|E9|AD|E0|BD|5F|6D| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |  first | 6 |79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96| 
  |  hex   |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |  digit | 7 |97|98|99|A2|A3|A4|A5|A6|A7|A8|A9|C0|4F|D0|A1|07| 
  |  of    |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |  byte  | 8 |00|01|02|03|37|2D|2E|2F|16|05|25|0B|0C|0D|0E|0F| 
  |  of    |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |  ASCII | 9 |10|11|12|13|3C|3D|32|26|18|19|3F|27|22|1D|35|1F| 
  |  data  |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | A |40|5A|7F|7B|5B|6C|50|7D|4D|5D|5C|4E|6B|60|AF|61| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | B |F0|F1|F2|F3|F4|F5|F6|F7|F8|F9|7A|5E|4C|7E|6E|6F| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | C |7C|C1|C2|C3|C4|C5|C6|C7|C8|C9|D1|D2|D3|D4|D5|D6| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | D |D7|D8|D9|E2|E3|E4|E5|E6|E7|E8|E9|AD|E0|BD|5F|6D| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | E |79|81|82|83|84|85|86|87|88|89|91|92|93|94|95|96| 
  |        |---+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| 
  |        | F |97|98|99|A2|A3|A4|A5|A6|A7|A8|A9|C0|4F|D0|A1|07| 
  -------------------------------------------------------------- 

Figure 2 shows an example of EZACIC05 call instructions.

Figure 2. EZACIC05 call instruction example
    WORKING-STORAGE SECTION.
        01  IN-BUFFER    PIC X(length of output)
        01  LENGTH       PIC 9(8) BINARY VALUE
 
    PROCEDURE DIVISION.
         CALL 'EZACIC05' USING IN-BUFFER LENGTH.         IF RETURN-CODE > 0
            THEN
            DISPLAY 'TRANSLATION FAILED ' RETURN-CODE.

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

IN-BUFFER
A buffer that contains the following information:
  • When called, ASCII data
  • Upon return, EBCDIC data
LENGTH
Specifies the length of the data to be translated.
RETURN-CODE
Upon return, register 15 contains a return code value, which indicates if the data translation occurred successfully. The return code can be one of the following values:
0
The data translation occurred.
8
Too many parameters passed, translation did not occur.
12
Zero buffer length passed, translation did not occur.
16
Zero buffer address passed, translation did not occur.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014