z/OS UNIX System Services Planning
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Steps for setting up Unicode Services

z/OS UNIX System Services Planning
GA32-0884-00

Setting up for Unicode Services conversion is similar to setting up for Enhanced ASCII with the following changes:
  • _BPXK_AUTOCVT can be set to ALL, which enables a Unicode Services conversion environment for the program or user.
  • AUTOCVT(ALL) can be specified in the BPXPRMxx parmlib member, which enables a Unicode Services conversion program for all programs and users. The SETOMVS or SET OMVS operator commands can turn AUTOCVT to ALL.
  • Instead of setting the ThliCcsid field the environment variable _BPXK_PCCSID should be set. For a description of the _BPXK_PCCSID environment variable, see _BPXK environment variables.

Before you begin: You need to have an overall understanding of the limitations of Unicode Services, as explained in Considerations beyond that of Enhanced ASCII.

Perform the following steps to set up Enhanced ASCII.

  1. Set up Unicode Services. Base your choice on your particular situation.
    If this situation exists . . . Then use . . .
    The application wants to exploit Unicode Services when enabling automatic conversion. The _BPXK_AUTOCVT environment variable can be set to ALL or fcntl(), or BPX1FCT can be called to enable to conversion. For the XL C/C++ runtime environment, refer to z/OS XL C/C++ Programming Guide.
    The application is run in the z/OS® UNIX shell or BPXBATCH. The _BPXK_AUTOCVT environment variable. _BPXK_AUTOCVT can be set to ALL, which enables a Unicode Services conversion environment for the program or user.
    You are enabling automatic conversion for the z/OS UNIX environment. AUTOCVT(ALL) in BPXPRMxx, which enables Unicode Services conversion environment for all programs and users.
    Tip: Use the SETOMVS and SET OMVS operator commands to turn AUTOCVT on or off.
  2. Assign the appropriate file tag for each file that is to be converted. Base your choice on your particular situation.
    If you choose this method . . . Then this happens . . .
    Issuing the chtag command. Files are permanently tagged.
    Mounting a file system with the TAG parameter. Files are temporarily tagged. All untagged files in the file system that is being mounted are implicitly tagged. When the file system is unmounted, the tags are lost.
    Issuing the F_SETTAG subcommand of the BPX1FCT (fcntl) callable service from a program. Files are either temporarily or permanently tagged, depending on the input parameters. For more information about BPX1FCT, see z/OS UNIX System Services Programming: Assembler Callable Services Reference.
    Issuing BPX1CHR (chattr) callable service from a program. Files are permanently tagged. For more information about BPX1CHR, see z/OS UNIX System Services Programming: Assembler Callable Services Reference.

    _______________________________________________________________

  3. Assign a coded character set identifier (CCSID) to each program or thread in the shell. By default, the initial CCSID for every thread is IBM®-1047 (EBCDIC).
    • For entire programs written in C/C++, use the ASCII compiler to change it to 819 (ISO8859-1 ASCII).
    • For C/C++ threads, use the F_CONTROL_CVT subcommand of fcntl().
    • For Assembler programs and threads, use the F_CONTROL_CVT subcommand of the BPX1FCT callable service. F_CONTROL_CVT sets the CCSID of the program associated with each opened file. (That is, the program CCSID can be different depending on which file is chosen.)
    • Set environment variable _BPXK_PCCSID.

When you are done, you have set up Unicode Services.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014