Using MSGFILE under z/OS UNIX

To direct MSGFILE output to a z/OS UNIX file, use the PATH= keyword in the ddname parameter of MSGFILE to specify a ddname that nominates a z/OS UNIX file.

If your application is running in an address space created by using the fork() or spawn() functions or if it is invoked by one of the exec family of functions, the application has access to a DD card only if you dynamically allocate one. If the application can access a DD card, MSGFILE output is directed to that file. If the allocated DD card contains the PATH= keyword, Language Environment directs the MSGFILE output to the specified file in the z/OS UNIX file system.

If your application is running under z/OS UNIX, or under any environment that has file descriptor 2 (FD2) open, MSGFILE output is directed to whatever FD2 points to. Under the shell this is typically your terminal.

If FD2 does not exist but your application is either running in an address space created by the fork() or spawn() functions or invoked by one of the exec family of functions, MSGFILE output is directed to the current working directory; if that directory is the root directory, the output is written to a file in the directory /tmp. The name of the file is the name you specify with the MSGFILE runtime option, with the default of SYSOUT.

The resulting file name has the following format:
/path/Fname.Date.Time.Pid
path
The current working directory (unless it is the working directory, in which case it is then /tmp).
Fname
The name specified in the FNAME parameter on the call to CEE3DMP (default is CEEDUMP).
Date
The date the dump is taken, appearing in the format YYYYMMDD (such as 19940325 for March 25, 1994).
Time
The time the dump is taken, appearing in the format HHMMSS (such as 175501 for 05:55:01 PM).
Pid
The process ID the application is running in when the dump is taken.
Note: Language Environment cannot direct MSGFILE output to a z/OS UNIX file in a CICS® environment.