MESSAGEOUT - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.00
Published
November 2016
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
hyz1479325149183.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Specifies the name of a file for BTEQ to store the messages that would normally be sent to the standard output.

Syntax

The following figures show the syntax for both mainframe-attached and workstation-attached systems.





where the following is true:

xxx
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
BOM|NOBOM
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.

Usage Notes

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.

BTEQ closes the MESSAGEOUT file when either of the following options is used:
  • 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:

.MESSAGEOUT DDNAME=MYOUT

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:

.MESSAGEOUT FILE=OUT1