Method 4 for PC mixed to EBCDIC mixed
This method has the following characteristics:
- It is used for conversion between an input PC mixed CCSID and an EBCDIC mixed CCSID (with SO-SI code extension controls).
- The valid encoding schemes for the input data are X'2300', X'2305' and X'3300', and for the output data is X'1301'.
- It uses a TYPE 3 conversion table (see Figure 57) consisting of:
- A control subtable
- A pool of single-byte to single-byte subtables (Type S)
- A pool of single-byte to double-byte subtables (Type D)
- There is an entry in the control subtable for each possible byte in the input string
- The two-byte entry in the control subtable shows how many bytes are to be taken from the input string (single- or double-byte), the pool from which the conversion table is to be selected, and which conversion table to select.
Figure 57. Method 4: PC Mixed Single/Double-Byte to Host Mixed Single/Double-Byte
Back to top
- The list of valid first bytes associated with the input CCSID is used for separating the double-byte code points from the single-byte code points. This function is built into the control subtable of a TYPE 3 table when the table contents are defined.
- This method can handle situations where the characters in an input CS are split among multiple output CSs.
- The pure double-byte substrings are mapped using the tables indicated in the control subtable. The first byte of each character is used as the index into the control subtable. The corresponding control table entry identifies the appropriate single-byte to double-byte table. The second byte is then used as the index into the single- to double-byte table. The contents of this cell will be a double-byte code point.
- The output double-byte substrings are bracketed within the SO-SI pair.
- The pure single-byte substrings are mapped using the appropriate single-byte to single-byte subtable, as identified in the control subtable of a TYPE 3 table.
- The output generator concatenates the converted substrings in the same order as their corresponding input substrings (the SO-SI pairs are part of the output double-byte substrings).
- The contents of the conversion tables used governs the accuracy of the output data.
- The addition of the SO-SI code extension controls generally results in an output string that is longer in length than the corresponding input string.
- The conversion method will generate single-byte control code points only outside the SO-SI pairs.
- All double-byte control code points will appear inside SO-SI pairs.
- The resultant output mixed string must be well formed. That is, all SO control codes must be paired with a matching SI control code even if the SI is the last character in the resultant string.
Return to Appendix B