_EDC_COMPAT

Indicates to z/OS® XL C/C++ that it should use old functional behavior for various items in code ported from old releases of C/370™. These functional items are specified by the value of the environment variable. _EDC_COMPAT is set with the following command, where x is an integer:
setenv("_EDC_COMPAT","x",1);
z/OS XL C/C++ converts the string "x" into its decimal integer equivalent, and treats this value as a bit mask to determine which functions to use in compatibility mode. The following table interprets the least significant bit as bit zero.
Bit
Function Affected
0
ungetc()
1
ftell()
2
fclose()
3 through 31
Unused

For this release, calls to fseek() with an offset of SEEK_CUR, fgetpos(), and fflush() take into account characters pushed back with the ungetc() library function. You must set the _EDC_COMPAT environment variable for ungetc() if you want these functions to ignore ungetc() characters as they did in old C/370 code.

For ftell(), z/OS XL C/C++ uses an encoding scheme that varies according to the attributes of the underlying data set. You must set the _EDC_COMPAT environment variable for ftell() if you want to use encoded ftell() values generated in old C/370 code.

You can set _EDC_COMPAT to indicate that fclose() should not unallocate the SYSOUT=* data set when it is closing "*" data sets created under batch. This is to ensure that such data sets can be concatenated with the Job Log, if their attributes are compatible.

Here are some examples of how you can set _EDC_COMPAT: