z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Character Data Conversion

z/OS DFSMS Using Data Sets
SC23-6855-00

Data management lets you convert from one character representation to another when using ISO/ANSI tapes. Conversion occurs according to one of the following techniques:

  • Coded Character Set Identifier (CCSID) Conversion. CCSID conversion provides data management conversion to convert records between one CCSID which defines the character representation of the data in the records on tape to another CCSID which defines the character representation of the data in the records used by the application program. You can request that BSAM or QSAM perform this type of conversion for ISO/ANSI V4 tapes by supplying a CCSID in the CCSID parameter of a JOB statement, EXEC statement, or DD statement as well as through dynamic allocation or TSO ALLOCATE. CCSIDs are ignored if specified for other than ISO/ANSI V4 tapes.

    The CCSID which describes the data residing on the tape is taken from (in order of precedence):

    1. The CCSID supplied on the DD statement, or dynamic allocation, or TSO ALLOCATE.
    2. The CCSID field stored in the tape label.
    3. The default (to CCSID of 367 representing 7-bit ASCII) if a CCSID has been supplied for the application program.

    The CCSID that describes the data to use by the application program is taken from (in order of precedence):

    1. The CCSID supplied on the EXEC statement.
    2. The CCSID supplied on the JOB statement.
    3. The default (to CCSID of 500 representing International EBCDIC) if a CCSID has been supplied for the tape data.

    Data records can contain any character data as defined by the CCSID in which it was created.

    You can prevent access method conversion by supplying a special CCSID of 65535. In this case, data management transfers the data between the tape and the application program without conversion.

    See Converting Character Sets for a list of supported CCSID combinations and CCSID Decision Tables for a description of CCSID processing rules.

    Restrictions: The following restrictions apply when CCSID conversion is used:
    • Only SBCS to SBCS or DBCS to DBCS is supported. For more information about double byte character sets (DBCS), see Using the Double-Byte Character Set (DBCS).
    • When converting from one CCSID to another, changes in length for data records are not supported and will result in an error.
    • All data management calls (OPEN, READ/WRITE, GET/PUT, CLOSE) must be made in the original key of the task (TCBPKF). Key switching is not supported and results in an error.
    • All data management calls must be made in the task in which the DCB was opened. Subtasking is not supported and will result in an error.
    • Supervisor state callers are not supported for any data management calls and results in an error.
  • Default character conversion. Data management provides conversion from ASCII to EBCDIC on input, and EBCDIC to ASCII for output in any of the following cases (see Tables for Default Conversion Codes):
    • ISO/ANSI V1 and V3 tapes
    • ISO/ANSI V4 tapes without CCSID
    • Unlabeled tapes with OPTCD=Q

    Related reading: For information about conversion routines that the system supplies for this type of conversion, which converts to and from ASCII 7-bit code, see z/OS DFSMS Using Magnetic Tapes.

    When you convert from ASCII to EBCDIC, if a source character contains a bit in the high-order position, the 7-bit conversion does not produce an equivalent character. Instead, it produces a substitute character to note the loss in conversion. This means, for example, that the system cannot record random binary data (such as a dump) in ASCII 7-bit code.

    The system cannot use CCSID conversion to read or write to an existing data set that was created using default character conversion, unless DISP=OLD.

    When you use CCSIDs, the closest equivalent to default character conversion is between a CCSID of 367, which represents 7-bit ASCII, and a CCSID of 500, which represents International EBCDIC.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014