Input/Output in the z/OS Unicode Environment

Even when character data in a PeopleSoft z/OS COBOL program is stored and processed internally in Unicode, there are some cases where data is needed in a native non-Unicode character set of the system. This is especially true for the purpose of input and output operations, and because external systems may not fully support Unicode.

Database Input/Output

PeopleSoft uses COBOL mainly for high-performance SQL batch jobs. Db2 for z/OS supports communication with COBOL programs in Unicode using GRAPHIC and VARGRAPHIC data types.

All PeopleSoft-delivered COBOL programs are designed to communicate through the single central database access program PTPSQLRT. This program is enhanced to support communication with databases using Unicode.

Note:

You may need to manually modify custom COBOL programs if they do not use PTPSQLRT or PTPDYSQL for database communication. The PeopleSoft-provided COBOL Unicode conversion utility for z/OS does not update SQL communication logic automatically.

Logging

PeopleSoft COBOL programs output logs using DISPLAY statements. The logs are mainly for displaying informational and debug messages. As these may need to be displayed on z/OS terminal screens which cannot display Unicode data, the PeopleSoft COBOL Unicode conversion utility inserts the DISPLAY-OF() COBOL intrinsic function to convert data to the system EBCDIC character set in the context of the DISPLAY statement.

Note:

Because logs are generated in the system EBCDIC code page, not all the Unicode characters display on the log file. Characters not included in the system code page will be lost. Do not attempt to display international characters on the COBOL log. For reporting purpose, use the Structured Query Report (SQR) language instead of COBOL.

File Processing

A small number of PeopleTools COBOL programs use file input/output using READ and WRITE statements, for parameter input from JCL or writing logs. As these input/output can be better done using the system EBCDIC character set rather than Unicode, the PeopleTools COBOL programs performing file input/output are updated to convert to and from EBCDIC when accessing files. Because of the very limited use of file input/output, the COBOL Unicode conversion utility does not perform any special work for file input/output.

Note:

Use Application Engine for processes that involve file input and output.

Miscellaneous Input/Output Operations

There are other cases where you should use the EBCDIC character set for string data, such as when accessing environment variables. PeopleSoft delivered programs are modified to convert internal Unicode representation of strings just before passing it to external data area, or convert from EBCDIC to internal Unicode representation, when required. However, the COBOL source conversion utility will not automatically update them. If you have custom COBOL programs that access external data, you may need to test them thoroughly after running the conversion utility, and insert DISPLAY-OF() or NATIONAL-OF() COBOL intrinsic functions where data conversions are required.