MBCS Conversion During z/OS to UNIX Copy

The following is an example for copying a z/OS file to a UNIX system and converting the IBM®-943 code set on the z/OS system to the SJIS code set on the UNIX system.

COPY  FROM  (PNODE DISP=SHR                                     -
             DSN=TEST1.MBCS.IBM943                              -
             SYSOPTS="CODEPAGE=(IBM-943,UTF-8)" )               -
      TO    (SNODE DISP=RPL                                     -
             DSN=\'/home/unix3500/cab1\ ||                      -
                 \ /CD/TestData/Source/codepage/Sjis390.txt' \  -
             sysopts=":codepage=(UTF-8,SJIS):datatype=binary" )

First, the IBM-943 code set data is converted to UTF-8 on the z/OS node. Then, as specified in the TO clause, the UTF-8 encoded data is transferred to the UNIX node, which converts the data to the SJIS code set and writes a UNIX file.