Identifying Unicode Data for z/OS, Unicode Data for Microsoft Windows/Unix and Non-Unicode Data
A COBOL program may need to determine whether it’s dealing with non-Unicode data, Unicode data for Microsoft Windows/Unix in UTF-8 format, or Unicode data for the z/OS environment in UCS-2 format.
The conversion utility can get this information from the ENCODING-MODE-SW data field in the PTCSQLRT copy library. ANSI-mode is the same as non-Unicode. Unicode-mode represents Unicode processing on Microsoft Windows/Unix using UTF-8, and National-mode represents Unicode processing on z/OS using UCS-2.
03 ENCODING-MODE-SW PIC X(1) VALUE SPACE.
88 ANSI-MODE VALUE 'A'.
88 UNICODE-MODE VALUE 'U'.
88 NATIONAL-MODE VALUE 'N'.
The ENCODING-MODE-SW field value is set by default during installation. If when installing the file server you select the Unicode database option and build the PeopleSoft Process Scheduler environment on z/OS by running the PeopleSoft server transfer process, the value is automatically set to National-mode in the z/OS Unicode environment.
Note:
It is very important to distinguish Unicode processing on Microsoft Windows/Unix from Unicode processing on z/OS. Unicode processing on Microsoft Windows/Unix requires expanding storage size by explicitly updating the field length. In the z/OS environment, Unicode values are stored using different data type (national), and you need not expand the storage size explicitly.