TEXT Subcommand (OUTPUT EXPORT Command)

The TEXT subcommand exports output in text format.

  • Text output formats include local encoding, UTF-8, and UTF-16.
  • Pivot tables can be exported in tab-separated or space-separated format.
  • All text output is exported in space-separated format.
  • Graphics are exported as separate files in the selected graphics format. A line is inserted in the text file indicating the file name of each exported image. (Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.)
  • Graphics are exported to the same folder as the text document. Image file names use the text file name as the root name, followed by a sequential integer, starting with 0.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the text document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /TEXT DOCUMENTFILE='/mydocs/myresults.txt'.

ENCODING Keyword

The ENCODING keyword specifies the type of text file to create. The keyword is followed by an equals sign and one of the following alternatives:

LOCALE. Export in the character set (code page) of the current locale. This is the default. For more information, see SET Command, LOCALE subcommand.

UTF8. Export as 8-bit Unicode text.

UTF16. Export as 16-bit Unicode text.

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.  

SEPARATOR Keyword

Pivot table output can be exported as space-separated or tab-separated text. The SEPARATOR keyword is followed by an equals sign and one of the following alternatives:

SPACE. Use spaces to separate columns. This is the default.

TAB. Use tabs to separate columns.

COLUMNWIDTH Keyword

For space-separated pivot table output, the COLUMNWIDTH keyword controls column width. The available alternatives are:

COLUMNWIDTH=AUTOFIT. Make each column as wide as the widest label or value in that column. Column contents will not be wrapped. This is the default.

COLUMNWIDTH=n. Wrap labels or values longer than n characters wide. The value of n must be a positive integer.

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

ROWBORDER Keyword

For space-separated pivot table output, the ROWBORDER keyword specifies the character used to create row borders. The keyword is followed by an equals sign and a single quoted character. The default is a hyphen (-).

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

COLUMNBORDER Keyword

For space-separated pivot table output, the COLUMNBORDER keyword specifies the character used to create column borders. The keyword is followed by an equals sign and a single quoted character. The default is the vertical bar/pipe symbol (|).

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

IMAGEFORMAT Keyword

The IMAGEFORMAT keyword controls the format of the exported graphics. The keyword is followed by an equals sign and one of the following alternatives:

BMP. Bitmap format. A raster graphics format.

EMF. Enhanced metafile format. A vector graphic format that is available only on Windows operating systems.

EPS. Encapsulated PostScript format. This format is often used when the quality of printed images is important.

JPG. Joint Photographic Experts Group format. This is the default.

PNG. Portable Network Graphics format. A raster graphics format.

TIF. Tagged image file format. A raster graphics format.

Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.

Example

OUTPUT EXPORT
  /TEXT DOCUMENTFILE='/mydocs/myresults.txt'
   ENCODING=UTF8
   SEPARATOR=TAB
   IMAGEFORMAT=PNG.