Examples of the CCSID parameter

Example 1
     //JOB1    JOB    (123456)
     //S1      EXEC   PGM=MYPGM
     //DD1     DD     DSN=A,DISP=NEW,UNIT=3590,
     //               VOL=SER=T00001,LABEL=AL

In this example, the data on the new ISO/ANSI tape is converted from EBCDIC to 7-bit ASCII because CCSID was not specified at the JOB, EXEC, or DD levels. If the data passed to the access methods contain graphic or special characters there could be data loss on conversion to 7-bit ASCII. This is the default operation for ISO/ANSI/FIPS Version 3 and ISO/ANSI Version 4 tapes.

Example 2
     //JOB2    JOB    (123456)
     //S1      EXEC   PGM=MYPGM
     //DD1     DD     DSN=A,DISP=OLD,UNIT=3590,
     //               VOL=SER=T00001,LABEL=AL

In this example the data on the ISO/ANSI tape is converted from 7-bit ASCII (default) to EBCDIC. This is the default operation for ISO/ANSI/FIPS Version 3 and ISO/ANSI Version 4 tapes.

Example 3
     //JOB3    JOB    (123456)
     //S1      EXEC   PGM=MYPGM
     //DD1     DD     DSN=A,DISP=NEW,UNIT=3590,
     //               CCSID=65535,VOL=SER=T00003,LABEL=AL

In this example the data written to the ISO/ANSI Version 4 tape is not converted (CCSID=65535).

Example 4
     //JOB4    JOB    (123456)
     //S1      EXEC   PGM=MYPGM
     //DD1     DD     DSN=A,DISP=OLD,UNIT=3590,
     //               CCSID=65535,VOL=SER=T00004,LABEL=AL

In this example the user did not want any conversion (CCSID=65535) on data read by the access methods.

Example 5
     //JOB5    JOB    (123456),CCSID=37
     //S1      EXEC   PGM=MYPGM1
     //DD1     DD     DSN=A,DISP=NEW,LABEL=(,AL),
     //               VOL=SER=T00005,UNIT=3590,CCSID=437

In this example the user wants conversion from a CCSID of 37 (CECP: USA, Canada, Netherlands, Portugal, Brazil, Australia, New Zealand) to 437 (Base PC-data) for data written using BSAM or QSAM for ISO/ANSI Version 4 tape. The CCSID of 437 is recorded on the tape header label.

Example 6
     //JOB6    JOB    (123456),CCSID=37
     //S1      EXEC   PGM=MYPGM2
     //DD1     DD     DSN=A,DISP=OLD,UNIT=3590,
     //               VOL=SER=T00006,CCSID=437

In this example the user wants data conversion from a CCSID of 437 to a CCSID of 37 for data read by the access method. Note that the CCSID does not have to be specified if it is recorded in the label.

Example 7
     //JOB7    JOB    (123456),CCSID=37
     //S1      EXEC   PGM=MYPGM
     //DD1     DD     DSN=A,DISP=OLD,UNIT=3590,
     //               VOL=SER=T00007

In this example the ISO/ANSI labeled tape had a recorded CCSID of 437 and a CCSID was not specified on the DD statement. Data read from this tape by the access method is converted from a CCSID of 437 to a CCSID of 37.

Example 8
     //JOB8    JOB    (123456),CCSID=37
     //S1      EXEC   PGM=MYPGM1
     //DD1     DD     DSN=A,DISP=NEW,LABEL=(,AL),UNIT=3590,
     //               VOL=SER=T00008,CCSID=437
     //S2      EXEC   PGM=MYPGM2,CCSID=65535
     //DD1     DD     DSN=B,DISP=NEW,LABEL=(,AL),UNIT=3590,
     //               VOL=SER=T00009

This example illustrates overriding the CCSID specified on the JOB statement by the specification on the EXEC statement.

In this example, in step S1 the user wants conversion from a CCSID of 37 to 437 for data written using BSAM or QSAM for the ISO/ANSI Version 4 tape.

In step S2 the JOB level CCSID of 37 is overridden by the EXEC level CCSID of 65535. Since a CCSID of 65535 prevents conversion, the data written to tape is not converted. A CCSID of 65535 is recorded in the tape header label because no CCSID was specified on the DD statement.