Specifies the name of a file for BTEQ to store the messages that would normally be sent to the standard output.
The following figures show the syntax for both mainframe-attached and workstation-attached systems.
where the following is true:
- The name of the z/OS JCL DD or UNIX file name of the file to receive data that is normally sent to the standard output
- For workstation-attached systems, determines if a BOM (Byte Order Mark) is inserted at the beginning of a new MESSAGEOUT file for Unicode sessions.
Specifying BOM inserts a UTF-8 or UTF-16 byte order mark, while NOBOM does not. The default is BOM.
This option does not apply if the file already exists and is non-empty. It is not available for non-Unicode sessions or for mainframe-attached systems.
This option does not apply to mainframe-attached systems because standard output is written in EBCDIC for Unicode sessions.
If specifying an existing file, BTEQ appends data to that file. Otherwise, a new file is created. Use any device name that is valid on the system as a file name.
- A MESSAGEOUT command specifying another message file.
- An EXIT or QUIT command is executed.
BTEQ does not close the file until the last file record is written. If the file is read before it is closed, the last few records might be missing. They are added when the file is closed in response to the MESSAGEOUT, EXIT, or QUIT command.
For workstation-attached systems, when BTEQ is started with the -m command line option, stdio is based on the system locale. Therefore, the MESSAGEOUT file contains locale-specific characters (instead of UTF-8 or UTF-16 encoded characters) and does not contain a BOM.
Example 1 – MESSAGEOUT
For z/OS, to redirect messages to the DDNAME MYOUT use the following command:
Where DDNAME was previously defined with a TSO command. For example:
.TSO ALLOCATE DDNAME(MYOUT) DSNAME(YOUR.MSG.OUT) SHR
Example 2 – MESSAGEOUT
From a workstation-attached system, to redirect standard output to the file OUT1, use the following command: