The DOCUMENT Procedure

Results: DOCUMENT Procedure

ODS Documents in the Documents Window

Understanding When to Use the Documents Window

The Documents window displays ODS documents in a hierarchical tree structure. The Documents window does the following:
  • displays all ODS documents, including ODS documents stored in SAS libraries
  • organizes, manages, and customizes the layout of the entries contained in ODS documents
  • displays the property information of ODS documents
  • replays entries
  • renames, copies, moves, or deletes ODS documents
  • creates shortcuts to ODS documents
For a comparison of the Documents window to the Results Window, see Comparisons between the Documents Window and the Results Window.

Viewing an ODS Document in the Documents Window

To view the Documents window, submit this command in the command bar:
odsdocuments
This display shows the Documents window that contains the ODS document named Sasuser.Univ. In the display, notice that Sasuser.Univ contains several directory levels. The Exponential_x directory contains the Exp output object. When you double-click an output object, such as Exp, that output object is replayed in the Results window to all open destinations.
Documents Window
Documents Window
A Documents window contains these items:
entry
is an output object, link, or directory.
Note: Only output objects of the type Document are displayed in the Documents window.
directory
is a grouping of ODS document entries.
link
is a symbolic link from one specified output object to another output object.
Note: Within the Documents window, a link is called a shortcut.
ODS document
is the name of an ODS document.

ODS Document Icon

The Results window and the Documents window use this icon to indicate an ODS document output object:
ODS Document Icon
ODS Document Icon
z/OS Specifics: The ODS Documents window on z/OS has the same functionality, but does not use graphical icons.

Using the Documents Window Pop-up Menu

The Documents window has a pop-up menu with features that are also available through batch processing. To view the Documents window pop-up menu, follow these steps:
  1. Type odsdocuments in the command bar. The Documents window appears.
  2. Right-click any entry in the Documents window. The pop-up menu appears.
Pop-up Menu for the Documents Window
Pop-up Menu for the Documents Window
The following table describes the pop-up menu item features. The availability of each pop-up menu item depends on which entry you select in the Documents window.
Tasks That You Can Do with the Documents Window Pop-up Menu
Task
Menu Item
Open the selected object in the Results Viewer
Open
Select a new ODS destination output type
Open As
Open a window in tree view and list view
Explore From Here
Create a new folder
New Folder
Remove the selected entry from the Documents window
Cut
Copy the selected entry to system memory
Copy
Paste the copied entry to the selected location
Paste
Create a shortcut to the entry
Create Shortcut
Delete the selected entry
Delete
Rename the selected entry
Rename
Show the entries that were previously excluded
Show Excluded
Remove from the tree, but do not delete the selected entry
Exclude
Expand all the levels of the tree
Expand All
Collapse all the levels in the tree
Collapse All
Replay the selected entry to all open ODS destinations
Replay
Print the selected entry
Print
Display the properties of the selected entry
Properties

ODS Documents in the Results Window

Understanding When to Use the Results Window

Although the Results window (like the Documents window) lists ODS documents, the Results window also lists other types of output objects, such as PDF and HTML. The Results window displays the following information:
  • the output object types that are created when you run a SAS program in the current SAS session. SAS creates an output object for each ODS destination that was open at the time you executed a procedure during the current SAS session only.
  • the results after you create a new output object from the Documents window using the Open As or Replay feature.
  • the properties of an entry.
The Results window also deletes or renames entries.

Viewing Entries in the Results Window

To view the Results window, submit this command in the command bar:
odsresults
You can also view the Results window by selecting: Viewthen selectResults
The following display shows the Results window with files and output objects. The last file is Univariate:100 Obs Sampled from a Normal Distribution. Under this file is the same output object sent to three different destinations. Each output object is named Normal, and the destinations are LISTING, HTML, and DOCUMENT.
Results Window Showing the Output Object “Normal” in Three Formats
Results Window Showing the Output Object “Normal” in Three Formats
For more information about using the Results window, make the Results window the active window and select Helpthen selectUsing This Window.

Comparisons between the Documents Window and the Results Window

Tasks That You Can and Cannot Do in the Documents Window and the Results Window
Task
Documents window
Results window
View all SAS documents including those stored in SAS libraries
Yes
Yes
View output object types that are created when you run a SAS program, such as HTML, PDF, and SAS document
No
Yes
View the results after you create a new output object
Yes
Yes
Customize the layout of output objects
Yes
No
View the property information of SAS documents
Yes
Yes
View the properties of an output object
No
Yes
Delete or rename entries
Yes
Yes
Copy or move SAS documents
Yes
No
Create shortcuts to SAS documents
Yes
No
Drag and drop output objects
Yes
No

Viewing the Properties of an Entry

Any entry that you select in either the Results window or the Documents window has an associated Properties window. To view the properties of an entry, follow these steps:
  1. Select an entry from either the Results Window or the Documents window.
  2. Right-click the entry. A pop-up menu appears.
  3. Select Properties. The Properties window for the entry appears.
Entry Properties Window
Entry Properties Window
Items will vary, depending on the entry that you select in the Documents or Results windows. The Results window for an ODS document output object can contain these items:
Created
is the date that the entry was created.
Document
is the SAS filename where the entry is located. The filename is in the form of libref.filename.
Document path
is the location of the entry in the tree structure. If you move the entry to another location in the Documents window, then this path will change.
Modified
is the date that the entry was modified.
Name
is the name of the entry.
Path
is the storage location inside the document of the entry.
Type
is the classification of the entry.

Creating Shortcuts in the Documents Window

The Documents window pop-up menu provides you with a Create Shortcut option. Shortcut links are useful when you are creating output that uses the same entry in more than one place. Instead of copying the entry to each location, consider using a shortcut. Shortcuts have these advantages:
  • Because a shortcut is a link to the original entry, any changes that you make to the original entry will appear when you select the shortcut.
  • A shortcut uses fewer computer resources.
To create a shortcut, do this:
  1. Right-click an entry in the Documents window. A pop-up menu appears.
  2. Select Create Shortcut. A new shortcut entry appears below the selected entry.

Comparisons between the Documents Window and the Document Procedure

Tasks That You Can and Cannot Do in the Documents Window and with the DOCUMENT Procedure
Task
Documents Window
DOCUMENT Procedure
Create a new ODS document
Yes
Yes
Create a new folder
Yes
Yes
Import a data set or graph segment
No
Yes
Copy folders or output objects
Yes
Yes
Move folders or output objects
Yes
Yes
Create a symbolic link from one output object to another output object
Yes
Yes
Delete a document, folder, or output object
Yes
Yes
Rename a folder or output object
Yes
Yes
Assign a description to a folder or output object
Yes
Yes
Prevent entries from being displayed when they are replayed
Yes
Yes
Show entries that are excluded
Yes
Yes
Enable hidden entries to be displayed
Yes
Yes
Replay to the specified open ODS destinations
Yes
Yes
Determine the path specification
Yes
Yes
Set or display the current directory
No
Yes
Create or delete a page break
No
Yes
Create or modify title lines
No
Yes
Create or modify subtitles
No
Yes
Create of modify the lines of text before output objects
No
Yes
Create or modify the lines of text after output objects
No
Yes
Create or modify footnote lines
No
Yes
Create text strings in the current folder
No
Yes