Randall Becker
Randall Becker

Reputation: 85

Controlling automatic conversion from ASCII to EBCDIC via xlc fgets() in USS

I have an application on z/OS USS that happily reads EBCDIC (IBM-1047) and ASCII (ISO8859-1) files that are tagged with either encoding into char[] buffers. When started from a shell, the C runtime will automatically convert the file contents in fgets() into EBCDIC for the program to use. This allows comparisons with literals encoded natively in EBCDIC.

However, when the program is run via Jenkins (Java JVM 1.8), the automatic conversion is suppressed and fgets() returns data unchanged, so ASCII. I have tried supplying every environment variable in the user's .profile and /etc/profile to the JVM, and verified that they are in the program's envp.

Does anyone know where the control of this function is documented or available?

Upvotes: 2

Views: 628

Answers (1)

Hogstrom
Hogstrom

Reputation: 3761

One of the ways of controlling automatic conversion is _BPXK_AUTOCVT=ON This article here describes the issue on more detail.

Here is a snippet:

enter image description here

enter image description here

Upvotes: 2

Related Questions