_EDC_ERRNO_DIAG

Indicates if additional diagnostic information should be generated, when the perror() or strerror() functions are called to produce an error message. This environment variable also controls how much additional information is produced. _EDC_ERRNO_DIAG is set with the following command, where x is an integer and y is a list of integer errno values, for which additional diagnostic information is desired.
setenv("_EDC_ERRNO_DIAG","x,y",1);
The list of errno values must be separated by commas. If the y value is omitted, then additional diagnostic information is generated for all errno values. If a non-numeric errno value is found in y, it is treated as 0. Acceptable values for x are as follows:
0
No additional diagnostic information is generated (This is the default if _EDC_ERRNO_DIAG is not set).
1
The ctrace() function is called to generate additional diagnostic information.
2
The csnap() function is called to generate additional diagnostic information.
3
The cdump() function is called to generate additional diagnostic information.
See z/OS XL C/C++ Runtime Library Reference for details on the level of diagnostic information provided by the above functions.
The following list shows examples of how to use this environment variable.
  • No additional diagnostic information is produced.
    setenv("_EDC_ERRNO_DIAG","0",1);
  • The ctrace() function is called for any errno when perror() or strerror() are called.
    setenv("_EDC_ERRNO_DIAG","1",1);
  • The csnap() function is called only when errno equals 121 when perror() or strerror() are called.
    setenv("_EDC_ERRNO_DIAG","2,121",1);
  • The cdump() function is called only when errno equals either 121 or 129 when perror() or strerror() are called.
    setenv("_EDC_ERRNO_DIAG","3,121,129",1);