SAS 9.1 Output Delivery System Users Guide

Task

Statement

Insert a copy of an entry into a specified path

COPY

Delete entries from a specified path or paths

DELETE

Set or display the current directory

DIR

Open a document and its contents to browse or edit

DOC

Close the current document

DOC CLOSE

Prevent output from being displayed when the document is replayed

HIDE

Import a data set or graph segment into the current directory

IMPORT

Create a symbolic link from one output object to another output object

LINK

List the content of one or more entries

LIST

Create one or more new directories

MAKE

Move entries from one directory to another directory

MOVE

Create text strings in the current directory

NOTE

Create or modify lines of text after the specified output object

OBANOTE

Create or modify lines of text before the specified output object

OBBNOTE

Create or modify lines of text at the bottom of the page in which the output object is displayed

OBFOOTN

Create or delete a page break for an output object

OBPAGE

Create or modify subtitles

OBSTITLE

Create or modify lines of text at the top of the page where the output object is displayed

OBTITLE

Assign a different name to a directoryor output object

RENAME

Replay one or more entries to the specified open ODS destination(s)

REPLAY

Assign a label to the current entry

SETLABEL

Enable the output of a hidden entry to be displayed when it is replayed

UNHIDE

PROC DOCUMENT Statement

Creates or opens a document to modify

Default: Documents are opened in the UPDATE access mode.

Caution: If you do not explicitly close the DOCUMENT destination with an ODS DOCUMENT CLOSE statement, then ODS continues to append files to your document.

PROC DOCUMENT < options < access-options >>;

Without Options

If no options are specified, then the PROC DOCUMENT statement opens the last document that was created in the current SAS session.

Options

NAME= <<libref.>memname <access-options>

LABEL=' label '

COPY Statement

Copies an entry into the specified path

Default: If you do not specify a location where to insert an entry into a path, then the entry is inserted at the end of the path.

COPY path <, path-2, ...path-n > TO path < / < LEVELS= value ALL >< FIRST LAST BEFORE= path AFTER= path >>;

Required Arguments

path

Options

DELETE Statement

Deletes entries from the current file location

Restriction: You cannot delete or move the root file location.

Caution: The DELETE statement affects all levels of a file location below the specified path.

DELETE path < , path-2, ...path-n >;

Required Arguments

path

DIR Statement

Sets or displays the current file location

Featured In: Example 1 on page 244, Example 2 on page 248, and Example 3 on page 253

DIR < path >;

Without Options

If no options are specified, then the DIR statement displays the current path.

Options

path

DOC Statement

Opens a document and its contents to browse or edit

Default: Documents are opened in the UPDATE access mode.

Featured In: Example 1 on page 244 and Example 2 on page 248

DOC < options < access-options >>;

Without Options

If no options are specified, then the DOC statement lists the ODS documents that exist in all SAS libraries.

Options

LABEL= ' label '

LIBRARY= library-name

NAME= libref.memname <access-options>

access-options

DOC CLOSE Statement

Closes the current document

DOC CLOSE ;

HIDE Statement

Prevents output from being displayed when the document is replayed

Tip: To see entries that might be hidden in the current document, use the LIST statement.

HIDE path < , path-2, ...path-n >;

Required Arguments

path

IMPORT Statement

Imports the specified SAS data set or graph segment to the current file location

IMPORT DATA= data-set-name < data-set-options > GRSEG= grseg TO path < / < FIRST LAST BEFORE= path AFTER= path >>;

Required Arguments

DATA= data-set-name

GRSEG= grseg

Options

AFTER= path

BEFORE= path

data-set-options

FIRST

LAST

LINK Statement

Creates a symbolic link from one specified output object to another in the current file location

LINK path TO path < / < HARD >< LABEL >< FIRST LAST BEFORE= path AFTER= path >>;

Required Arguments

path

Options

AFTER= path

BEFORE= path

FIRST

HARD

LABEL

LAST

LIST Statement

Lists the contents of one or more entries

Default: If you omit the DETAILS option, then only summary information is displayed.

Default: If you omit the ORDER= option, then the contents of the specified entries are listed in INSERT order (the order in which you arranged the entries.)

Tip: To see any entries that might be hidden in the current file location, use the LIST statement.

Featured In: Example 1 on page 244, Example 2 on page 248, and Example 3 on page 253

LIST < path-1, path-2, ...path-n ></< DETAILS >< FOLLOW >< LEVELS= value ALL >< ORDER= ALPHA DATE INSERT >>;

Required Arguments

path

Options

DETAILS

FOLLOW

LEVELS= value ALL

ORDER= ALPHA DATE INSERT

MAKE Statement

Creates one or more new file locations

Default: If no location is specified, the newly created file location is appended to the end of the current file location.

MAKE path < , path-2, ...path-n >< / < FIRST LAST BEFORE= path AFTER= path >>;

Required Arguments

path

Options

AFTER= path

BEFORE= path

FIRST

LAST

MOVE Statement

Moves entries from the specified location to another location

Restriction: You can not move or delete the root file location.

Requirement: When you specify more than one path, separate the paths with a comma.

Caution: The MOVE statement effects all levels of a file location below the specified starting level.

MOVE path <, path-2, ...path-n > TO path < / < LEVELS= value ALL >< FIRST LAST BEFORE= path AFTER= path >>;

Required Arguments

path

Options

AFTER= path

BEFORE= path

FIRST

LAST

LEVELS= value ALL

NOTE Statement

Creates text strings in the current file location

Default: If you omit the JUST= option, then the note is centered between the left and right margins.

Default: If no location is specified, then the note is added to the end of the current location.

Featured In: Example 3 on page 253

NOTE path < 'text' >< / < JUST= LEFT CENTER RIGHT >< FIRST LAST BEFORE= path AFTER= path >>;

Without Options

If no text is specified, then the NOTE statement creates a blank note.

Required Arguments

path

Options

AFTER= path

BEFORE= path

FIRST

JUST= LEFT CENTER RIGHT

LAST

text

OBANOTE Statement

Creates or modifies an object footer (lines of text) after the specified output object

Featured In: Example 3 on page 253

OBANOTE < n > output-object < 'object-footer-text' >< /JUST= LEFT CENTER RIGHT >;

Required Arguments

output-object

Options

JUST= LEFT CENTER RIGHT

n

object-footer-text

OBBNOTE Statement

Creates or modifies an object header (lines of text) before the output object

Featured In: Example 3 on page 253

OBBNOTE < n > output-object < object-header-text >< /JUST= LEFT CENTER RIGHT >;

Required Arguments

output-object

Options

JUST= LEFT CENTER RIGHT

n

object-header-text

OBFOOTN Statement

Creates or modifies lines of text at the bottom of the page on which the output object is displayed

Restriction: You can print up to ten lines of text.

Tip: The OBFOOTN statement is similar to the global FOOTNOTE statement.

Featured In: Example 3 on page 253

OBFOOTN < n > output-object < 'text' >;

Required Arguments

output-object

Options

n

text

OBPAGE Statement

Creates or deletes a page break for an output object

Featured In: Example 3 on page 253

OBPAGE output-object < /DELETE AFTER >;

Required Arguments

output-object

Without Options

If no options are specified, then the OBPAGE statement inserts a page break before an output object.

Options

AFTER

DELETE

OBSTITLE Statement

Creates or modifies subtitles

Featured In: Example 3 on page 253

OBSTITLE < n > output-object < 'text' >< /JUST= LEFT CENTER RIGHT >;

Required Arguments

output-object

Options

JUST= LEFT CENTER RIGHT

n

text

OBTITLE Statement

Creates or modifies title lines for the output

Tip: The OBTITLE is similar to the global TITLE statement.

Featured In: Example 3 on page 253

OBTITLE < n > output-object < 'text' >;

Required Arguments

output-object

Options

n

text

RENAME Statement

Assigns a different name to a file location or output object

RENAME path-1 TO path-2 ;

Required Arguments

path-1

path-2

REPLAY Statement

Displays one or more entries to the specified open ODS destination(s)

Default: If you omit the LEVELS= option, then all levels of the file are displayed to all open destinations.

Featured In: Example 2 on page 248 and Example 3 on page 253

REPLAY < path < , path-2, ...path-n >> </< LEVELS= value ALL >< DEST= ( ODS-destination(s) ) >>;

Options

ACTIVEFOOTN

ACTIVETITLE

DEST= ( ODS-destination(s) )

LEVELS= ALL value

path

SETLABEL Statement

Assigns a label to the specified path

SETLABEL path 'label' ;

Required Arguments

label

path

UNHIDE Statement

Enables the output of a hidden entry to be displayed when it is replayed

UNHIDE path < , path-2, ...path-n >;

Required Arguments

path

The DOCUMENT PROCEDURE and BY-Groups

You can customize labels, titles, and footnotes with the following statements by inserting BY variable values (#BYVAL), BY variable names (#BYVAR), or BY lines (#BYLINE) in labels that are specified in PROC DOCUMENT steps:

Note: The #BYVAL, #BYVAR, and #BYLINE substitutions will only show up for replayed output objects that belong to a BY group. Examples of output objects that do not belong to a BY group are:

To create these substitutions, embed the items in the specified object text string at the position where you want the substitution text to appear. The #BYVAL, #BYVAR, and #BYLINE substitutions have the following form:

#BYVAL n #BYVAL( variable-name )

#BYVAR n #BYVAR( variable-name )

#BYLINE

Категории