Statements |
Definition |
Global statements generally provide information to SAS, request information or data, move between different modes of execution, or set values for system options. Other global statements (ODS statements) deliver output in a variety of formats, such as in Hypertext Markup Language (HTML). You can use global statements anywhere in a SAS program. Global statements are not executable; they take effect as soon as SAS compiles program statements.
Other SAS software products have additional global statements that are used with those products. For information, see the SAS documentation for those products.
Global Statements by Category |
The following table lists and describes SAS global statements, organized by function into eight categories:
Statements Category | Functionality | |
---|---|---|
Data Access | associate reference names with SAS libraries, SAS catalogs, external files and output devices, and access remote files. | |
Log Control | alter the appearance of the SAS log. | |
ODS: Output Control | choose objects to send to output destinations; edit the output format. | |
ODS: SAS Formatted | apply default styles to SAS specific entities such as a SAS data set, SAS output listing, or a SAS document. | |
ODS: Third-Party Formatted | apply styles to the output objects that are used by applications outside of SAS. | |
Operating Environment | access the operating environment directly. | |
Output Control | add titles and footnotes to your SAS output; deliver output in a variety of formats. | |
Program Control | govern the way SAS processes your SAS program. |
The following table provides brief descriptions of SAS global statements. For more detailed information, see the individual statements.
Category | Statement | Description |
---|---|---|
Data Access |
CATNAME Statement |
Logically combines two or more catalogs into one by associating them with a catref (a shortcut name); clears one or all catrefs; lists the concatenated catalogs in one concatenation or in all concatenations. |
FILENAME Statement |
Associates a SAS fileref with an external file or an output device, disassociates a fileref and external file, or lists attributes of external files. | |
FILENAME Statement, CATALOG Access Method |
Enables you to reference a SAS catalog as an external file. | |
FILENAME, CLIPBOARD Access Method |
Enables you to read text data from and write text data to the clipboard on the host computer. | |
FILENAME Statement, EMAIL (SMTP) Access Method |
Enables you to send electronic mail programmatically from SAS using the SMTP (Simple Mail Transfer Protocol) e-mail interface. | |
FILENAME Statement, FTP Access Method |
Enables you to access remote files by using the FTP protocol. | |
FILENAME Statement, SFTP Access Method |
Enables you to access remote files by using the SFTP protocol. | |
FILENAME Statement, SOCKET Access Method |
Enables you to read from or write to a TCP/IP socket. | |
FILENAME Statement, URL Access Method |
Enables you to access remote files by using the URL access method. | |
FILENAME Statement, WebDAV Access Method |
Enables you to access remote files by using the WebDAV protocol. | |
LIBNAME Statement |
Associates or disassociates a SAS library with a libref (a shortcut name), clears one or all librefs, lists the characteristics of a SAS library, concatenates SAS libraries, or concatenates SAS catalogs. | |
LIBNAME Statement for WebDAV Server Access |
Associates a libref with a SAS library and enables access to a WebDAV (Web-based Distributed Authoring And Versioning) server. | |
Log Control |
Comment Statement |
Specifies the purpose of the statement or program. |
PAGE Statement |
Skips to a new page in the SAS log. | |
SKIP Statement |
Creates a blank line in the SAS log. | |
Operating Environment |
X Statement |
Issues an operating-environment command from within a SAS session. |
Output Control |
FOOTNOTE Statement |
Writes up to 10 lines of text at the bottom of the procedure or DATA step output. |
TITLE Statement |
Specifies title lines for SAS output. | |
Program Control |
CHECKPOINT EXECUTE_ALWAYS Statement |
Indicates to execute the DATA step or PROC step that immediately follows without considering the checkpoint-restart data. |
DM Statement |
Submits SAS Program Editor, Log, Procedure Output or text editor commands as SAS statements. | |
ENDSAS Statement |
Terminates a SAS job or session after the current DATA or PROC step executes. | |
%INCLUDE Statement |
Brings a SAS programming statement, data lines, or both, into a current SAS program. | |
%LIST Statement |
Displays lines that are entered in the current session. | |
LOCK Statement |
Acquires and releases an exclusive lock on an existing SAS file. | |
OPTIONS Statement |
Specifies or changes the value of one or more SAS system options. | |
RUN Statement |
Executes the previously entered SAS statements. | |
%RUN Statement |
Ends source statements following a %INCLUDE * statement. | |
SASFILE Statement |
Opens a SAS data set and allocates enough buffers to hold the entire file in memory. | |
SYSECHO Statement |
Fires a global statement complete event and passes a text string back to the IOM client. |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.