ODS LISTING Statement

Opens, manages, or closes the LISTING destination.
Valid in: Anywhere
Category: ODS: SAS Formatted
Note: The ODS LISTING statement supports Scalable Vector Graphics. Scalable Vector Graphics (SVG) is an XML language for describing two-dimensional vector graphics. For information about scalable vector graphics, see Using Scalable Vector Graphics in SAS/GRAPH: Reference.

Syntax

ODS LISTING <action> ;

Without Arguments

If you use the ODS LISTING statement without an action or options, it opens the LISTING destination.

Actions

The following actions are available for the ODS LISTING statement:

CLOSE
closes the LISTING destination and any files that are associated with it.
Tip:When you close an ODS destination, ODS does not send output to that destination. Closing an unneeded destination frees some system resources.
EXCLUDE exclusion(s)| ALL | NONE
excludes one or more output objects from the LISTING destination.
Default:NONE
Restriction:The LISTING destination must be open for this action to take effect.
SELECT selection(s) | ALL | NONE
selects output objects for the LISTING destination.
Default:ALL
Restriction:The LISTING destination must be open for this action to take effect.
SHOW
writes the current selection or exclusion list for the LISTING destination to the SAS log.
Restriction:The LISTING destination must be open for this action to take effect.
Tip:If the selection or exclusion list is the default list (SELECT ALL), then SHOW also writes the entire selection or exclusion list.

Optional Arguments

DATAPANEL=number | DATA | PAGE
suggests how to split a table that is too wide to fit on a single page into sections of columns and rows. Each section of columns and rows is a data panel. Each data panel has column headings at the top.
Note: In this context, a page is what the procedure uses as a page in creating the LISTING output. The SAS system options LINESIZE= and PAGESIZE= generally determine the page size, although some procedures (PROC REPORT, for example) can temporarily override the values that the system options specify.
number
writes the specified number of observations in a panel, if possible. More than one panel can occur on every page if space permits.
Range:1 to the largest integer that the operating system supports
DATA
bases the size of the panel on the way that the table is stored in memory. This value provides the fastest performance. However, if the table contains many columns, the number of rows in each panel might be small.
PAGE
tries to make panels that match the page size. If the table contains more columns than can fit on a page, the first page is filled with as many observations as possible for as many columns as can fit on a single line. The second page contains the same observations for the next group of columns, and so on, until all rows and columns have been printed.
This arrangement minimizes the amount of space that is used for column headings because most pages contain observations for only one set of columns.
Restriction:If the page size is greater than 200, ODS uses DATAPANEL=200.
Default:PAGE
DEVICE= device-driver
specifies the name of a device driver. ODS automatically selects an optimal default device for each open output destination.
The following table lists default devices for the most common ODS output destinations.
Output Destination
Default Device
HTML
PNG
LISTING
Host Specific Display Device (PC- WIN, UNIX - XCOLOR, VMS - Display Device)
Measured RTF
PNG
RTF
SASEMF
PCL
SASPRTM (Monochrome Output) 1
PDF
SASPRTC (Color Output) 1
POSTSCRIPT
SASPRTC (Color Output) 1
PRINTER
Host Specific Default Printer 1
1Does not support changing the default device in the SAS Registry.
Tip:Specifying a device on the ODS DEVICE= option takes precedence over the SAS global option and the graphics option.
See:DEVICE= System Option in SAS System Options: Reference.

See Overview: Using Graphics Devices in SAS/GRAPH: Reference in SAS/GRAPH: Reference for information about selecting device drivers.

FILE=file-specification
specifies the file to write to. file-specification is one of the following:
'external-file'
is the name of an external file to which to write.
fileref
is a file reference that has been assigned to an external file. Use the FILENAME statement to assign a fileref. For information about the FILENAME statement, see SAS Statements: Reference.
Default:If you do not specify a file to write to, ODS writes the output to the LISTING window.
GPATH= file-specification <(url='Uniform-Resource-Locator' | NONE)>
specifies the location for all graphics output that is generated while the destination is open.
file-specification
specifies the file or SAS catalog to which to write. ODS names automatically each output object that it places in the file. If you specify an invalid filename, the ActiveX and Java devices send output to the default filename. Other devices create the file as a directory and write output to that directory using the default filename. For more information about how ODS names catalog entries and external files, see SAS/GRAPH: Reference. file-specification is one of the following:
external-file
is the name of an external file to write to.
Requirement:You must enclose external-file in quotation marks.
fileref
is a file reference that has been assigned to an external file. Use the FILENAME statement to assign a fileref. For information about the FILENAME statement, see SAS Statements: Reference.
Interaction:If you specify a fileref in the GPATH= option, ODS does not use information from the GPATH= option when it constructs links.
libref.catalog
specifies a SAS catalog to which to write.
URL= 'Uniform-Resource-Locator' | NONE
specifies a URL for file-specification.
Uniform-Resource-Locator
is the URL that you specify. ODS uses this URL instead of the filename in all the links and references that it creates to the file.
Requirement:You must enclose Uniform-Resource-Locator in quotation marks.
NONE
specifies that no information from the GPATH= option appears in the links or references.
Tip:This option is useful for building output files that can be moved from one location to another. The links from the contents and page files will resolve if they are constructed with a simple URL (one name) and the contents, page, and body files are all in the same location.
IMAGE_DPI=
specifies the image resolution of ODS graphics output. Output from device-based graphics is not affected.
Default:96
Restriction:The IMAGE_DPI= option affects template-based graphics only.
PACKAGE <package-name>
specifies that the output from the destination be added to a package.
package-name
specifies the name of a package that was created with the ODS PACKAGE statement. If no name is specified, then the output is added to the unnamed package that was opened last.
See also:
SGE= ON | OFF
determines whether you can edit ODS graphics output with the ODS Graphics Editor.
Default:OFF
Restriction:The SGE= option affects template-based graphics only.

Details

Beginning with SAS 9.3, by default, in the Windowing environment with the Windows and UNIX operating systems, the LISTING destination is closed and the HTML destination is open. You do not have to submit an ODS HTML statement to generate HTML output, and you do not have to use the ODS HTML CLOSE statement to be able to view your output. However, to create LISTING output, you must either submit the ODS LISTING statement or enable the LISTING destination by other means. For more details, see Working with Output Defaults in SAS 9.3.
The HTML destination now supports Scalable Vector Graphics (SVG). For information about scalable vector graphics, see Using Scalable Vector Graphics in SAS/GRAPH: Reference.