Statements Listed by Product

Base SAS

A B C D E F G I K L M N O P R S T U V W X

Name
Syntax and Description
ABORT <ABEND | CANCEL <FILE> | EXIT<n> | RETURN<n> | NOLIST> ;
Stops executing the current DATA step, SAS job, or SAS session.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
array-name:= array-name;
array-name:=(constant-list);
Assigns either a temporary array or a constant list to a temporary array.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
array-name {subscript};
Describes the elements in an array to be processed.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
ARRAY array-name { subscript }
<$ length | length | VARCHAR(length) | VARCHAR(*)>
<array-elements> <(initial-value-list)>;
Defines the elements of an array.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
variable=expression;
Evaluates an expression and stores the result in a variable.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
variable=expression;
Evaluates an expression and stores the result in a variable.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
ATTRIB variable-list(s) attribute-list(s);
Associates a format, informat, label, and length with one or more variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
BY <DESCENDING> column... <DESCENDING> column;
Controls the operation of a MERGE or SET statement in a DS2 program and sets up special grouping variables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
BY <DESCENDING> variable-1 <...<DESCENDING> variable-n>
<NOTSORTED> <GROUPFORMAT>;
Controls the operation of a SET, MERGE, MODIFY, or UPDATE statement in the DATA step and sets up special grouping variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
CALL routine(parameter-1 <, ...parameter-n>);
Invokes a SAS CALL routine.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
Specifies that lines of data follow the statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
Specifies that the lines of data that follow the statement contain internal semicolons.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
CATNAME <libref.> catref
< (libref-1.catalog-1 <(ACCESS=READONLY)>
<…libref-n.catalog–n <(ACCESS=READONLY)>>)>;
CATNAME <libref.> catref CLEAR | _ALL_ CLEAR;
CATNAME <libref.> catref LIST | _ALL_ LIST;
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.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
CHECKPOINT EXECUTE_ALWAYS;
Indicates to execute the DATA step or PROC step that immediately follows without considering the checkpoint-restart data.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
*message;
or
/*message*/
Specifies the purpose of the statement or program.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
CONTINUE;
Stops processing the current DO loop iteration and resumes with the next iteration.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
CONTINUE;
Stops processing the current DO-loop iteration and resumes processing the next iteration.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DATA < <table-expression> > <... <table-expression> > ;
program-body
< ENDDATA ; >
<table-expression>::=
table (table-options)
| _ROWSET_ (table-options)
| _NULL_
Begins a DS2 program and provides names for any output tables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DATA statement for creating output data sets
DATA <data-set-name-1 <(data-set-options-1)> >
<...data-set-name-n <(data-set-options-n)> >
</ <NESTING> <STACK=stack-size> <HEXLISTALL>> <NOLIST>;
DATA statement for creating a DATA step view
DATA view-name <data-set-name-1 <(data-set-options-1)> >
<...data-set-name-n <(data-set-options-n)> > / VIEW=view-name
<(<password-option> <SOURCE=source-option> )>
<NESTING> <NOLIST>;
DATA statement for creating a stored compiled DATA step program
DATA data-set-name / PGM=program-name
<(<password-option> <SOURCE=source-option> )>
<NESTING> <NOLIST>;
DATA statement for describing a DATA step view
DATA VIEW=view-name <(password-option)> <NOLIST>;
DESCRIBE;
DATA statement for use with a stored compiled DATA step program
DATA PGM=program-name <(password-option)> <NOLIST>;
<DESCRIBE;>
<REDIRECT INPUT | OUTPUT old-name-1 = new-name-1<… old-name-n = new-name-n> ;>
<EXECUTE;>
Begins a DATA step and provides names for any output such as SAS data sets, views, or programs.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DATALINES;
Specifies that lines of data follow the statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DATALINES4;
Specifies that the lines of data that follow the statement contain internal semicolons.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DECLARE <PRIVATE> PACKAGE package <(table-options)>
<package-variable> <... <package-variable> >;
<package-variable::=
{ scalar-package-variable <(constructor-arguments)> }
| { array-package-variable\[ array-bounds \] }
| { array-package-variable\[ array-bounds \] := \[ (constructor-arguments-1), ...(constructor-arguments-N) \] }
<array-bounds>::=
{ \[ <array-bound> <, ...<array-bound> \] >}
| { \[ * \] }
<array-bound>::=
{ <dim-lower:> dim-upper }
{ dim-lower := n }
{ dim-upper: n } | { DIM (array-name<, n>) }
Creates a package variable and optionally creates a package instance.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE DATAGRID variable();
DECLARE PACKAGE DATAGRID variable(name);
Creates a package variable and enables you to create an instance of the datagrid package
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE fcmp-package-name variable ( );
Creates a package variable and gives you the option to create an instance of the FCMP package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE HITER variable <( 'hash-name' | hash-package-instance)>;
Creates a hash iterator package variable and gives you the option of creating an instance of the hash iterator package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE HASH variable ( );
DECLARE PACKAGE HASH variable (hashexp, {'datasource' | '\{sql-text\}'},
'ordered', 'duplicate ', 'suminc', 'multidata');
DECLARE PACKAGE HASH variable ( \[keys\], \[data\], <hashexp,
{'datasource' | '\{sql-text\}'}, 'ordered', 'duplicate ', 'suminc', 'multidata'>
);
DECLARE PACKAGE HASH variable ( \[keys\], <hashexp, {'datasource' |
'\{sql-text\}'}, 'ordered', 'duplicate ', 'suminc', 'multidata'>
);
Creates a package variable and gives you the option of creating an instance of the hash package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE HTTP variable( );
Creates a package variable and enables you to create an instance of the HTTP package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE JSON variable( );
Creates a package variable and enables you to create an instance of the JSON package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE LOGGER variable(<logger-name>);
Creates a package variable and gives you the option of creating an instance of the logger package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE MATRIX variable (<row-dimension, column-dimension>);
Creates an instance of a MATRIX package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE PCRXFIND variable (<regular-expression>);
Creates a package variable and gives you the option of creating an instance of the PCRXFIND package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE PCRXREPLACE variable (<regular-expression>);
Creates a package variable and gives you the option of creating an instance of the PCRXREPLACE package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE REDISCLI variable();
Creates a package variable and enables you to create an instance of the RedisCli package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE SQLSTMT variable <('sql-text' <,\[parameter-variable-list\]>)>;
DECLARE PACKAGE SQLSTMT variable ( );
DECLARE PACKAGE SQLSTMT variable ;
Creates a package variable and enables you to create an instance of the SQLSTMT package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE PACKAGE TZ variable (<time-zone-id>);
Creates a package variable and enables you to create an instance of the TZ package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE < PRIVATE > { <data-type> <variable-list> < <having-clause> > } ;
< data-type >::=
<exact-numeric-type> | <approximate-numeric-type> | <binary-string-type> | <string-type>
| <date-type>
<exact-numeric-type> ::=
{INT | BIGINT | SMALLINT | TINYINT
| DECIMAL < (precision < ,scale > ) > | NUMERIC < (precision < ,scale >) > }
<approximate-numeric-type> ::=
{ DOUBLE | DOUBLE PRECISION | FLOAT | REAL }
<binary-string-type>::=
BINARY(length) | VARBINARY(length)
<string-type>::=
NCHAR < ( character-length ) >
| NVARCHAR < ( character-length ) >
| CHAR < ( character-length ) > <CHARACTER SET character-set-identifier >
| VARCHAR < ( character-length ) > <CHARACTER SET character-set-identifier >
<date-type>::=
{ TIME | TIMESTAMP } < ( precision ) > | DATE
<variable-list>::=
{ variable <...variable > }
| { variable <array-declaration> <variable...<array-declaration> > }
<array-declaration>::=
\[ <array-bound> < , ...< array-bound> > \] | \[ * \]
<array-bound>::=
{ <dim-lower:> dim-upper} | { <dim-lower:> {DIM (a< ,n >) }
<having-clause>::=
HAVING <having-option> <... <having-option> >
<having-option>::=
LABEL 'string' | n'string'
| FORMAT format
| INFORMAT format
Declares one or more DS2 variables or temporary arrays.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DECLARE ODSOUT object-reference <( )>;
Declares an ODS object and creates an instance of and initializes data for an ODS object.
Product: Base SAS
Document: SAS Viya Workbench: Advanced Topics for the Output Delivery System
DECLARE THREAD thread <(table-options)> instance( argument ) <... instance ( argument )>;
Creates an instance of a thread.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DELETE;
Stops processing the current observation.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DESCRIBE;
Retrieves source code from a stored compiled DATA step program or a DATA step view.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DO <<numeric-data-type>><index-variable = <index-variable-clause>> < <conditional-clause> >
<, ...<<index-variable-clause>> < <conditional-clause> >>;
...statement-list...
END <end-label > ;
< numeric-data-type >::=
<exact-numeric-type> | <approximate-numeric-type>
<exact-numeric-type> ::=
{INT | BIGINT | SMALLINT | TINYINT
| DECIMAL <(precision <,scale> )> | NUMERIC <(precision <,scale>)> }
<approximate-numeric-type> ::=
{ DOUBLE | DOUBLE PRECISION | FLOAT | REAL }
<index-variable-clause>::=
start <TO stop <BY increment >>
<conditional-clause>::=
WHILE ( expression ) | UNTIL ( expression )
Specifies a group of statements to be executed as a unit.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DO;
...more SAS statements...
END;
Specifies a group of statements to be executed as a unit.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DO index-variable=specification-1 <, ...specification-n>;
...more SAS statements...
END;
Executes statements between the DO and END statements repetitively, based on the value of an index variable.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DO UNTIL (expression);
...more SAS statements...
END;
Executes statements in a DO loop repetitively until a condition is true.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DO WHILE (expression);
...more SAS statements...
END;
Executes statements in a DO loop repetitively while a condition is true.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DROP PACKAGE package <(table-options)>;
RUN;
Deletes a DS2 package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DROP column-list | vararray;
Excludes columns from output tables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DROP variable-list;
Excludes variables from output SAS data sets.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
DROP THREAD thread <(table-options)>;
Deletes a DS2 thread program.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
DS2_OPTIONS options;
Specifies or changes the default behavior of a DS2 program.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
END;
Ends DO group or SELECT group processing.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
ENDDATA;
Marks the end of a DATA statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
ENDPACKAGE;
Marks the end of a PACKAGE statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
ENDSAS;
Stops SAS program execution as soon as the statement is encountered in a SAS program.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
ENDTHREAD;
Marks the end of a THREAD statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
ERROR <message>;
Sets _ERROR_ to 1. A message written to the SAS log is optional.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
EXECUTE;
Executes a stored compiled DATA step program.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
FILE file-specification <device-type> <options>;
Specifies the current output file for PUT statements.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
FILENAME fileref <device-type> 'external-file' <ENCODING='encoding-value'>
<options>;
FILENAME fileref <device-type> <options>;
FILENAME fileref 'pathname-1' ... 'pathname-n' | directory-name <ENCODING='encoding-value'>
<options>;
FILENAME fileref <access-method> 'external-file' access-information;
FILENAME fileref CLEAR | _ALL_ CLEAR;
FILENAME fileref LIST | _ALL_ LIST ;
Associates a SAS fileref with an external file or an output device, disassociates a fileref and external file, or lists attributes of external files.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref ABSobject-pathACCOUNTNAME=account-nameCONTAINER=container-nameAPPLICATIONID=application-ID<abs-options>;
Enables you to access data in Microsoft Azure Blob Storage.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref ADLSobject pathACCOUNTNAME=account-nameAPPLICATIONID=application-IDFILESYSTEM=file-system<adls-options>;
Enables you to access data in Microsoft Azure Data Lake Storage (ADLS).
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref CATALOG 'catalog' <catalog-options>;
Enables you to reference a SAS catalog as an external file.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref CLIPBRD <BUFFER=paste-buffer-name>;
Enables you to read text data from and write text data to the clipboard on the host computer.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref DATAURL 'data-url-specification' <data-url-options>;
Enables you to read data from user-specified text.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref EMAIL <'address' > < email-options>;
Enables you to send electronic mail programmatically from SAS using the SMTP (Simple Mail Transfer Protocol) email interface.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref FILESRVC 'file-uri' <filesrvc-options>;
FILENAME fileref FILESRVC collection-option <filesrvc-options>;
Enables you to store and retrieve user content using the SAS Viya Files service.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref FTP 'external-file' <ftp-options>;
Enables you to access remote files by using the FTP protocol.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref GCSobject-pathBUCKET=bucket-nameKEY=service-account-key-file-path<gcs-optional-arguments>;
Enables you to access data in Google Cloud Storage.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref S3 "object-path" <s3-options>;
Enables you to access data objects in an Amazon S3 or MinIO environment.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref SOCKET 'hostname:portno'
<tcpip-options>;
FILENAME fileref SOCKET ':portno' SERVER
<tcpip-options>;
Enables you to read from or write to a TCP/IP socket.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref URL 'external-file' <url-options>;
Enables you to access remote files by using the URL access method.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME filref WEBDAV 'external-file' <webdav-options>;
Enables you to access remote files by using the WebDAV protocol.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FILENAME fileref ZIP 'external-file' <zip-options>;
Enables you to access ZIP files.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FOOTNOTE <1–10> <ods-format-options> <'text-string'>;
The FOOTNOTE statement controls the content, appearance, and placement of footnote text. You can write up to 10 lines of text at the bottom of the graph.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
FOOTNOTE<1-10> <ods-format-options> <text-options><‘text-string’>;
Controls the content, appearance, and placement of text in a footnote.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
FORMAT variable-1 <...variable-n> <format> <DEFAULT=default-format>;
FORMAT variable-1 <...variable-n> format <DEFAULT=default-format>;
FORMAT variable-1 <...variable-n> format variable-1 <...variable-n> format;
Associates formats with variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
FORWARD method < ...method >;
Indicates that the method definition follows the method expression.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
GOTO label;
Transfers execution immediately to a labeled statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
GOTO label;
Directs program execution immediately to the statement label that is specified and, if followed by a RETURN statement, returns execution to the beginning of the DATA step.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
IF expression;
Continues processing only those rows that meet the condition.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
IF expression;
Continues processing only those observations that meet the condition of the specified expression.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
IF expression THEN statement;
< ELSE statement ;>
Executes a statement for rows that meet specific conditions.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
IF expression THEN statement;
<ELSE statement;>
Executes a SAS statement for observations that meet specific conditions.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
%INCLUDE source(s)
</<SOURCE2> <S2=length> <options> >;
Brings a SAS programming statement, data lines, or both, into a current SAS program.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
INFILE file-specification <device-type> <options>;
INFILE DBMS-specifications;
Specifies an external file to read with an INPUT statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INFORMAT variable-1 <…variable-n> <informat>;
INFORMAT <variable-1> <… variable-n> <DEFAULT=default-informat>;
INFORMAT variable-1 <…variable-n> informat <DEFAULT=default-informat>;
Associates informats with variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INPUT <specification(s)> <@ | @@>;
Describes the arrangement of values in the input data record and assigns input values to the corresponding SAS variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INPUT variable <$> start-column<–end-column>
<.decimals> <@ | @@>;
Reads input values from specified columns and assigns the values to the corresponding SAS variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INPUT <pointer-control> variable informat. <@ | @@>;
INPUT<pointer-control> (variable-list) (informat-list)
<@ | @@>;
INPUT <pointer-control> (variable-list) (<n*> informat.)
<@ | @@>;
Reads input values with specified informats and assigns them to the corresponding SAS variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INPUT <pointer-control> variable <$> <&> <@ | @@>;
INPUT <pointer-control> variable <: | & | ~>
<informat.> <@ | @@>;
Scans the input data record for input values and assigns them to the corresponding SAS variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
INPUT <pointer-control> variable= <$> <@ | @@>;
INPUT variable= <$> start-column<–end-column>
<@ | @@>;
Reads data values that appear after a variable name that is followed by an equal sign and assigns the values to corresponding SAS variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
KEEP column-list | vararray;
Includes columns in output tables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
KEEP variable-list;
Specifies the variables to include in output SAS data sets.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
LABEL variable-1 = 'text-string' <...variable-n = 'text-string'>;
LABEL variable-1 = ' ' < ...variable-n=’ ‘>; | variable-1 = <...variable-n= >;
Assigns descriptive labels to variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
label: statement;
Identifies a statement that is referred to by another statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
label: statement; < ... statement >;
Identifies a statement that is referred to by another statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
LEAVE < identifier > ;
Stops processing the current DO loop and transfers execution to either the statement following the current DO statement, or a labeled DO statement that encloses the current DO statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
LEAVE;
Stops processing the current loop and resumes with the next statement in the sequence.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
LENGTH variable-specification(s) <DEFAULT=n>;
Specifies the number of bytes for storing character and numeric variables, or the number of characters for storing VARCHAR variables.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
LIBNAME libref <engine> 'SAS-library'
< libname-options > <engine-host-options>;
LIBNAME libref CLEAR | _ALL_ CLEAR ;
LIBNAME libref LIST | _ALL_ LIST;
LIBNAME libref <engine> (library-specification-1 <...library-specification-n>)
<libname-options>;
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.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LIBNAME libref 'SAS data-library' <CVPBYTES=bytes><CVPENGINE=engine><CVPEXCLUDE=variable expression><CVPFORMATWIDTH=YES|NO><CVPINCLUDE=variable expression><CVPMULTIPLIER=multiplier>
<CVPVARCHAR=YES | NO>;
Associates a libref for the character variable padding (CVP) engine to expand character variable lengths so that character data truncation does not occur when a file requires transcoding.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LIBNAME libref JMP 'path' <FMTLIB=libref.format-catalog>;
Associates a libref with a JMP data table and enables you to read and write JMP data tables.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LIBNAME libref JSON < 'JSON-document-path' > <options>;
Provides read-only sequential access to JSON data.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LIBNAME libref SASEDOC 'path' <DOC_SEQNO=sequence-number> <options> ;
Uses the SASEDOC engine to associate a SAS libref (library reference) with one or more ODS output objects that are stored in an ODS document.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
LIBNAME libref V9 'SAS-library' <options>;
LIBNAME libref V9 (library-specification-1 <...library-specification-n>) <options>;
Assigns or deassigns a libref (a shortcut name) to a SAS library, concatenates SAS libraries, or concatenates SAS catalogs.
Product: Base SAS
Document: Accessing SAS Data with SAS Viya Workbench
LIBNAME libref <engine> 'SAS-library' < options > WEBDAV USER="user-ID"
PASSWORD="user-password" WEBDAV options;
LIBNAME libref CLEAR | _ALL_ CLEAR ;
LIBNAME libref LIST | _ALL_ LIST ;
Associates a libref with a SAS library and enables access to a WebDAV (Web-based Distributed Authoring And Versioning) server.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LINK label;
Directs program execution immediately to the statement label that is specified and, if followed by a RETURN statement, returns execution to the statement that follows the LINK statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
%LIST<n <:m | − m> >;
Displays lines that are entered in the current session.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LIST;
Writes to the SAS log the input data record for the observation that is being processed.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
LOCK libref<.member-name<.member-type | .entry-name.entry-type>>
<LIST | QUERY | SHOW | CLEAR | NOMSG>;
Acquires, lists, or releases an exclusive lock on an existing SAS file.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
LOSTCARD;
Resynchronizes the input data when SAS encounters a missing or invalid record in data that has multiple records per observation.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
MERGE <table-reference> <table-reference> <... <table-reference>> </RETAIN>;
<table-reference>::=
{ table < (table-options) > }
Joins rows from two or more tables into a single row.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
MERGE SAS-data-set-1 <(data-set-options)>
SAS-data-set-2 <(data-set-options) >
<...SAS-data-set-n <(data-set-options)> >
<END=variable>;
Joins observations from two or more SAS data sets into a single observation.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
< PRIVATE > METHOD method (<< IN_OUT > <parameter> < , ... < IN_OUT > >> )
<RETURNS data-type>;
...method-body ...
END;
<parameter>::=
<data-type> variable
< data-type >::=
<exact-numeric-type> | <approximate-numeric-type> | <binary-string-type> | <string-type>
| <date-type>
<exact-numeric-type> ::=
{INT | BIGINT | SMALLINT | TINYINT
| DECIMAL < (precision < ,scale > ) > | NUMERIC < (precision < ,scale >) > }
<approximate-numeric-type> ::=
{ DOUBLE | DOUBLE PRECISION | FLOAT | REAL }
<binary-string-type>::=
BINARY(length) | VARBINARY(length)
<string-type>::=
NCHAR < ( character-length ) >
| NVARCHAR < ( character-length ) >
| CHAR < ( character-length ) > <CHARACTER SET character-set-identifier >
| VARCHAR < ( character-length ) > <CHARACTER SET character-set-identifier >
<date-type>::=
{ TIME | TIMESTAMP } < ( precision ) > | DATE
Defines a block of code that can be called and executed multiple times.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
MISSING character(s);
Assigns characters in your input data to represent special missing values for numeric data.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
MODIFY master-data-set <(data-set-options)> transaction-data-set <(data-set-options)>
<CUROBS=variable> <NOBS=variable> <END=variable>
<UPDATEMODE=MISSINGCHECK | NOMISSINGCHECK>;
BY by-variable;
MODIFY master-data-set <(data-set-options)> KEY=index </ UNIQUE>
<KEYRESET=variable> <NOBS=variable> <END=variable>;
MODIFY master-data-set <(data-set-options)> <NOBS=variable> POINT=variable;
MODIFY master-data-set <(data-set-options)> <NOBS=variable> <END=variable>;
Replaces, deletes, and appends observations in an existing SAS data set in place but does not create an additional copy.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
;
Creates an empty statement.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
;
or
;;;;
Signals the end of data lines or acts as a placeholder.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
ODS _ALL_ CLOSE;
Closes all open ODS output destinations.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS CSV <(<ID=> identifier)> < action> ;
ODS CSV <(<ID=> identifier)> <options> ;
Opens, manages, or closes the CSV destination, which produces CSV output containing columns of data values that are separated by commas and produces tabular output.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS CSVALL <(<ID=> identifier)> < action> ;
ODS CSVALL <(<ID=> identifier)> <options> ;
Opens, manages, or closes the CSVALL destination, which produces CSVALL output containing columns of data values that are separated by commas and produces tabular output with titles, notes, and BY lines.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS DOCUMENT action;
ODS DOCUMENT
< NAME=<libref.> member-name <(access–option)> >
< DIR=(< PATH=path<(access-option)> < LABEL="label"> > )>
< CATALOG=permanent-catalog | _NULL_> ;
Opens, manages, or closes the DOCUMENT destination, which produces a hierarchy of output objects that enables you to produce multiple ODS output formats without rerunning a PROC or DATA step.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS EPUB <(<ID=> identifier)> < action> ;
ODS EPUB <(<ID=> identifier)> <options> ;
Opens, manages, or closes the EPUB destination, which generates EPUB e-books.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS ESCAPECHAR= 'escape-character';
Defines a representative character to be used in output strings.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS EXCEL <(<ID=> identifier)> < action> ;
ODS EXCEL <(<ID=> identifier)> <options> ;
Opens, manages, or closes the ODS destination for Excel, which produces Excel spreadsheet files compatible with Microsoft Office 2010 and later versions.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS <ODS-destination> EXCLUDE exclusion(s) | ALL | NONE;
Specifies output objects to exclude from ODS destinations.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS GRAPHICS <OFF | ON> < / options > ;
Enables or disables ODS Graphics processing and sets graphics environment options. This statement affects ODS template-based (ODS Graphics) graphics only. The ODS GRAPHICS statement does not affect device-based graphics (SAS/GRAPH).
Product: Base SAS
Document: SAS Graph Template Language: Reference for SAS Viya Workbench
ODS GRAPHICS <OFF | ON> < / options > ;
Enables or disables ODS Graphics processing and sets graphics environment options. This statement affects ODS template-based (ODS Graphics) graphics only. The ODS GRAPHICS statement does not affect device-based graphics (SAS/GRAPH).
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
ODS GRAPHICS <OFF | ON> < / options > ;
Enables or disables ODS Graphics processing and sets graphics environment options. This statement affects ODS template-based (ODS Graphics) graphics only. The ODS GRAPHICS statement does not affect device-based graphics (SAS/GRAPH).
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS HTML5 <(<ID=> identifier)> < action> ;
ODS HTML5 <(<ID=> identifier)> <options> ;
Opens, manages, or closes the HTML5 destination, which produces HTML 5.0 output that contains embedded style sheets.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS LAYOUT ABSOLUTE< option-1>< option-2 ...>
Enables you to specify an exact page location using x and y coordinates. Absolute layout is limited to one page and is supported only by the PDF destination
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS LAYOUT END;
Ends a gridded or absolute layout statement block.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS LAYOUT GRIDDED<option-1>< option-2 ...>
Enables you to arrange output dynamically in a two-dimensional grid structure.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS LISTING <action>;
ODS LISTING <DATAPANEL=number | DATA | PAGE> <FILE=file-specification>;
Opens, manages, or closes the LISTING destination.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS MARKUP < (<ID=> identifier) > < action> ;
ODS MARKUP < (<ID=> identifier) > <options> <TAGSET=tagset-name> <action> ;
Opens, manages, or closes the MARKUP destination, which produces SAS output that is formatted using one of many different markup languages.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS NOPROCTITLE;
Suppresses the title of the procedure that produces the results.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS OUTPUT action;
ODS OUTPUT data-set-definition(s);
Produces a SAS data set from an output object and manages the selection and exclusion lists for the OUTPUT destination.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS PACKAGE (<name> ) OPEN <options> ;
ODS PACKAGE (<name> ) PUBLISH
transport PROPERTIES(transport-property-1="value-1" ...transport-property-n ="value-n");
ODS PACKAGE (<name> ) ADD FILE=file-specification | DATA=member-specification
MIMETYPE="string" <PATH=path-specification> <options> ;
ODS PACKAGE (<name> ) CLOSE <CLEAR> ;
Opens, adds to, publishes, or closes one SAS Output Delivery System (ODS) package object.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS PATH <(APPEND | PREPEND | REMOVE) > location(s);
ODS PATH path-argument;
The ODS PATH statement controls where ODS stores new templates that you create and where ODS finds the templates that your programs use.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS PDF < (<ID=> identifier) > < action> ;
ODS PDF <(<ID=> identifier)> <options> ;
Opens, manages, or closes the PDF destination, which produces PDF output, a form of output that is read by Adobe Acrobat and other applications.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS POWERPOINT <(<ID=> identifier)> < action> ;
ODS POWERPOINT <(<ID=> identifier)> <options> ;
Opens, manages, or closes the ODS destination for PowerPoint, which produces PowerPoint output.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS PROCLABEL 'string';
ODS PROCLABEL= 'string';
Enables you to change a procedure label.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS PROCTITLE;
Writes, in the output, the name of the procedure that produces the results.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS REGION < option-1>< option-2 ...>
Creates a region container for absolute layouts. A region can contain output (such as text, tables, images, graphs) or nested layout containers.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS REGION (<option-1><option-2 ...>);
Creates a region container for gridded layouts. A region can contain output (such as text, tables, images, graphs) or nested layout containers.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS RTF < (<ID=> identifier) > action;
ODS RTF < (<ID=> identifier) > <options> ;
Opens, manages, or closes the RTF destination, which produces output written in Rich Text Format for use with Microsoft Word..
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS <ODS-destination> SELECT selection(s) | ALL | NONE;
Specifies output objects for ODS destinations.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS <ODS-destination> SHOW;
Writes the specified selection or exclusion list to the SAS log.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS directory.tagset-name file-specification <options> ;
ODS directory.tagset-name file-specification action;
Opens, manages, or closes the specified tagset destination.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS TAGSETS.RTF <(<ID=> identifier)> action;
ODS TAGSETS.RTF <(<ID=> identifier)> <options> ;
Opens, manages, or closes the RTF destination, which produces measured output that is written in Rich Text Format.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS TEXT= 'text-string'
Inserts text into your ODS output.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS TRACE ON </options> ;
ODS TRACE OFF;
Writes to the SAS log a record of each output object that is created, or suppresses the writing of this record.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS VERIFY <ON | OFF | ERROR | WARN> ;
Prints or suppresses a message indicating that a style template or a table template being used is not supplied by SAS.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
ODS WORD <(<ID=> identifier)> < action> ;
ODS WORD <(<ID=> identifier)> <options> ;
Opens, manages, or closes the ODS destination for Word, which generates Microsoft Word output compatible with Microsoft Office 2010 and later versions.
Product: Base SAS
Document: SAS Viya Workbench: Output Delivery System User’s Guide
OPTIONS options;
Specifies or changes the value of one or more SAS system options.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
OPTIONS options;
Specifies or changes the value of one or more SAS system options.
Product: Base SAS
Document: SAS System Options for SAS Viya Workbench
OUTPUT < { table < ... table > } | _ROWSET_ | _NULL_ >;
Writes the current row to a table.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
OUTPUT <data-set-name(s)>;
Writes the current observation to a SAS data set.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PACKAGE package </ENCRYPT=SAS | AES> </table-options>;
… package-body …
ENDPACKAGE;
PACKAGE fcmp-package-name </ENCRYPT=SAS | AES> </table-options>
LANGUAGE=[']FCMP['] TABLE='library-name';
… package-body …
ENDPACKAGE;
Creates a DS2 package.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
PAGE;
Skips to a new page in the SAS log.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
PROC procedure-name <options>;
Begins a procedure (PROC) step. The PROC step consists of a group of SAS statements that call and execute a procedure.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
PUT < put-list > < ... <put-list> > ;
<put-list>::=
_ALL_
| 'character-string'
| <'character-string'><eq-expression> <=> <<:> format <-L | -C | -R>>
<eq-expression>::=
identifier
| array-reference
| this-expression
| package-attribute
<package-attribute>::=
package-variable.package-attribute
| package-variable...<.package-variableN>.package-attribute
Prints the values of program variables, arrays, and constants to the SAS log.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
PUT <specification(s)> <> <@ | @@>;
PUT 'ERROR: text' | 'NOTE: text' | 'WARNING: text';
PUT 'ERROR- text' | 'NOTE: text' | 'WARNING- text';
Writes lines to the SAS log, to the SAS output window, or to an external location that is specified in the most recent FILE statement.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PUT variable start-column <- end-column>
<.decimal–places> <@ | @@>;
Writes variable values in the specified columns in the output line.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PUT <pointer-control> variable format. <@ | @@>;
PUT <pointer-control> (variable-list) (format-list) <@ | @@>;
Writes variable values with the specified format in the output line.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PUT <pointer-control> variable <@ | @@>;
PUT <pointer-control> <n*> 'character-string' <@ | @@>;
PUT <pointer-control> variable < : | ~> format.<@ | @@>;
Writes variable values and the specified character strings in the output line.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PUT <pointer-control> variable= <format.> <@ | @@>;
PUT variable= start-column <-end-column> <.decimal-places> <@ | @@>;
Writes variable values after the variable name and an equal sign.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
PUTLOG <‘text ’>;
PUTLOG <‘ERROR: text ’> <‘NOTE: text ’> <‘WARNING: text ’>
PUTLOG <‘ERROR- text ’> <‘NOTE- text ’> <‘WARNING- text ’>;
Writes a message to the SAS log.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
REDIRECT INPUT | OUTPUT old-name-1=new-name-1 <...old-name-n=new-name-n>;
Points to different input or output SAS data sets when you execute a stored program.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
REMOVE <data-set-name(s)>;
Deletes an observation from a SAS data set.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
RENAME old-name {= | AS} new-name < ... old-name {= | AS} new-name >;
Specifies new names for columns in output tables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
RENAME old-name-1=new-name-1 <...old-name-n=new-name-n>;
Specifies new names for variables in output SAS data sets.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
REPLACE <data-set-name-1> <...data-set-name-n>;
Replaces an observation in the same location.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
RESETLINE;
Restarts the program line numbers in the SAS log to 1.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
RESIZEARRAY array-name \[ n \];
Sets or modifies the number of elements in a temporary array that has dynamic bounds.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
RETAIN;
RETAIN column-list;
RETAIN column-list < constant-value >;
RETAIN column-list ( < constant-value > … < constant-value > );
< constant-value >::=
bit_constant
| hex_constant
| floating_constant
| decimal_constant
| sas_missing_value
| integer_constant
| string_constant
| null
| DATE character_constant
| TIME character_constant
| TIMESTAMP character_constant
RETAIN vararray;
Specifies that all columns or all columns in the column list have their values retained between executions of the RUN method.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
RETAIN <element-list(s) <initial-value(s) | (initial-value-1) | (initial-value-list-1)>
<... element-list-n <initial-value-n | (initial-value-n ) | (initial-value-list-n)> >> ;
Causes a variable that is created by an INPUT or assignment statement to retain its value from one iteration of the DATA step to the next.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
RETURN < expression >;
Returns execution from a method to the method caller.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
RETURN;
Stops executing statements at the current point in the DATA step and returns to a predetermined point in the step.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
RUN <CANCEL>;
Executes the previously entered SAS statements.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
%RUN;
Ends source statements following a %INCLUDE * statement.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
SASFILE <libref.> member-name<.member-type> <(password-options)>
OPEN | LOAD | CLOSE;
Opens a SAS data set and allocates enough buffers to hold the entire file in memory.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
SELECT < ( select-expression ) >;
< < when-list > < …< when-list> > > ;
< OTHERWISE statement-list > ;
END < end-label >;
<when-list>::=
WHEN ( when-expression ) < statement-list >
Executes one of several statements or groups of statements.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
SELECT <(select-expression)> ;
WHEN-1 (when-expression-1 <..., when-expression-n> ) statement;
<... WHEN-n (when-expression-1 <...,when-expression-n> ) statement;>
< OTHERWISE statement;>
END;
Executes one of several statements or groups of statements.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
SET FROM thread < THREADS = threads >;
Runs a DS2 program as one or more threads.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
SET < table-reference > < ... < table-reference > > <INDSNAME=variable> ;
< BY < DESCENDING > column < ... < DESCENDING > column >> ;
< table-reference>::=
{ table < (table-options) > }
| \{ sql-text \}
Reads rows from one or more tables.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
SET<SAS-data-set(s) <(data-set-options(s) )> >
<options>;
Reads an observation from one or more SAS data sets.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
SKIP <n>;
Creates a blank line in the SAS log.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
STOP;
Stops execution of the current DS2 program.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
STOP;
Stops execution of the current DATA step.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
variable + expression;
variableexpression;
Adds or subtracts the result of an expression to an accumulator variable.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
variable+expression;
Adds the result of an expression to an accumulator variable.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
SYSECHO <"text"> ;
Sends a global statement complete event and passes a text string back to the IOM client.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
SYSTASK COMMAND "operating environment command"<WAIT | NOWAIT><TASKNAME=taskname><MNAME=name-variable><STATUS=status-variable><SHELL="shell-command"><CLEANUP>;
SYSTASK LIST <_ALL_|taskname><STATE><STATVAR>;
SYSTASK KILL taskname<taskname>;
Issues an operating-environment command from a SAS session that executes, lists, or terminates asynchronous tasks.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
THREAD thread < ( data-type variable < , ... data-type variable > ) >
</ENCRYPT=SAS | AES> </table-options>;
thread-body
ENDTHREAD;
Creates a DS2 program thread.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
TITLE <1–10> <ods-format-options> <'text-string'>;
The TITLE statement controls the content, appearance, and placement of title text. You can write up to 10 lines of text at the top of the graph.
Product: Base SAS
Document: SAS ODS Graphics Procedures for SAS Viya Workbench
TITLE<1-10><ods-format-options> <text-options> <'text-string'>;
Controls the content, appearance, and placement of text in a title.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench
UPDATE master-data-set < (data-set-options) > transaction-data-set < (data-set-options) >
< END=variable >
< UPDATEMODE=MISSINGCHECK | NOMISSINGCHECK >;
BY by-variable;
Updates a file by applying transactions.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
VARARRAY <data-type> array-name <array-declaration> <<variable-list>> <<having-clause>>;
< data-type >::=
<exact-numeric-type> | <approximate-numeric-type> | <binary-string-type> | <string-type>
| <date-type>
<exact-numeric-type> ::=
{INT | BIGINT | SMALLINT | TINYINT
| DECIMAL [(precision [,scale] )] | NUMERIC [(precision [,scale])] }
<approximate-numeric-type> ::=
{ DOUBLE | DOUBLE PRECISION | FLOAT | REAL }
<binary-string-type>::=
BINARY(length) | VARBINARY(length)
<string-type>::=
NCHAR [ ( character-length ) ]
| NVARCHAR [ ( character-length ) ]
| CHAR [ ( character-length ) ] [CHARACTER SET character-set-identifier ]
| VARCHAR [ ( character-length ) ] [CHARACTER SET character-set-identifier ]
<date-type>::=
{ TIME | TIMESTAMP } [ ( precision ) ] | DATE
<array-declaration::=\[array-bound>[, ...<array-bound>]\
<array-bound>::= {[dim-lower:]dim-upper} | {[dim-lower:] {DIM(a[, n]) | *} }
<variable-list>::=
name-varlist |
| numbered-range-varlist
| name-range-list
| name-prefix-list
| type-varlist
| special-name-list
<having-clause>::=
HAVING <having-option> [… <having-option> ]
<having-option>::=
LABEL 'string' | n'string'
| FORMAT format
| INFORMAT format
Declares one or more DS2 variable arrays.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
VARLIST list-name \[variable-list\];
Creates a named variable list.
Product: Base SAS
Document: SAS DS2 Reference for SAS Viya Workbench
WHERE where-expression-1
< logical-operator where-expression-n>;
Selects observations from SAS data sets that meet a particular condition.
Product: Base SAS
Document: SAS DATA Step Statements for SAS Viya Workbench
X <<'>operating-environment-command<'>>;
Issues an operating-environment command from within a SAS session.
Product: Base SAS
Document: SAS Global Statements for SAS Viya Workbench

SAS Federation Server

A B C D E I R S U

Name
Syntax and Description
ALTER TABLE table <\{OPTIONS SAS-table-option=value <, ...SAS-table-option=value>\ }>
ADD COLUMN <, ...>
| ADD CONSTRAINT
| ALTER <COLUMN> <, ...>
| DROP COLUMN column<, ...column> <FORCE>
| DROP CONSTRAINT constraint<, ...constraint>
| RENAME TO table
| RENAME column TO column
;
::=
columndata-type <> <SET DEFAULT value | DROP DEFAULT>
::=
CONSTRAINT constraint
{CHECK (search-condition)
| PRIMARY KEY
| UNIQUE
| NOT NULL }
::=
CONSTRAINT constraint
{ CHECK (search-condition)
| PRIMARY KEY (column <, ...column>)
| UNIQUE (column<, ...column>)
| }
<>
::=
FOREIGN KEY (referencing-column <, ... referencing-column>)
REFERENCES referenced-table (referenced-column <, ...referenced-column>)
<>
::=
{<ON UPDATE <ON DELETE >
| ON DELETE <ON UPDATE >>
}
::=
CASCADE | SET NULL | SET DEFAULT | RESTRICT | NO ACTION
::=
{ DEFERRABLE <INITIALLY DEFERRED | INITIALLY IMMEDIATE>
| <INITIALLY DEFERRED | INITIAILLY IMMEDIATE> DEFERRABLE
| INITIALLY DEFERRED
| NOT DEFERRABLE <INITIALLY IMMEDIATE>
| <INITIALLY IMMEDIATE> NOT DEFERRABLE }
Adds or drops table columns and modifies column definitions.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
BEGIN <TRANSACTION>;
Marks the beginning of a transaction that comprises multiple statements.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
COMMIT <TRANSACTION>;
Makes changes that have been performed since the start of a transaction a permanent part of the database.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
CREATE <UNIQUE> INDEX index ON table
(column <ASCENDING | DESCENDING ><, ...column>);
Creates an index on columns in a specified table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
CREATE TABLE {table | _NULL_ }
<\{OPTIONS SAS-table-option=value <...SAS-table-option=value> \}>
( <, ... | >)
| AS query-expression
;
::=
column data-type <> <DEFAULT value>
<HAVING <FORMAT format><INFORMAT informat><LABEL 'label'>>
::=
CONSTRAINT constraint
{CHECK (search-condition)
| PRIMARY KEY
| UNIQUE
| NOT NULL}
::=
CONSTRAINT constraint
{CHECK (search-condition)
| PRIMARY KEY (column <, ...column>)
| UNIQUE (column <, ...column>)
| }
<>
::=
FOREIGN KEY (referencing-column <, ...referencing-column>)
REFERENCES referenced-table (referenced-column <, ...referenced-column>)

<>
::=
{ON UPDATE <ON DELETE >
| ON DELETE <ON UPDATE > }
::=
CASCADE | SET NULL | SET DEFAULT | RESTRICT | NO ACTION
::=
{DEFERRABLE <INITIALLY DEFERRED | INITIALLY IMMEDIATE>
| <INITIALLY DEFERRED | INITIALLY IMMEDIATE> DEFERRABLE
| INITIALLY DEFERRED
| NOT DEFERRABLE <INITIALLY IMMEDIATE>
| <INITIALLY IMMEDIATE> NOT DEFERRABLE}
Creates a new table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
CREATE VIEW view AS query-expression;
Creates a FedSQL view of data from one or more tables or other views.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DELETE FROM table <WHERE >;
Deletes rows from a table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DESCRIBE TABLE <catalog.><schema.> table;
Retrieves SQL from a table and returns a result set.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DESCRIBE VIEW <"catalog".><"schema".>"view"
DESCRIBE VIEW XML <"catalog".><"schema".>"view"
Retrieves SQL from a view and returns a result set.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DROP INDEX index <FROM table> <FORCE>;
Removes the specified index from a table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DROP TABLE table <FORCE>;
Removes a table from the database.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
DROP VIEW view <FORCE>;
Removes a view from the database.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
EXECUTE(native-syntax) BY catalog;
Sends a DBMS-specific statement to a DBMS that FedSQL supports.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
INSERT INTO table
{VALUES (value | NULL <, ...value | NULL>)};
INSERT INTO table
{ (column <, ...column>) VALUES (value | NULL <, ...value | NULL>) };
INSERT INTO table
{ (column <, ...column>) <query-expression> };
Adds rows to a specified table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
ROLLBACK <TRANSACTION>;
Rolls back transaction changes to the beginning of the transaction.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
The main clauses of the SELECT statement can be summarized as follows.
SELECT
FROM
<WHERE >
<GROUP BY >
<HAVING >
<ORDER BY >
<LIMIT {count | ALL}>
<OFFSET number>
;
The detailed syntax of the SELECT statement is as follows.
<ORDER BY <, ...>>;
::=
{ | }
{UNION | EXCEPT | INTERSECT} {<ALL><CORRESPONDING <BY (column<,... column>)>>} { | }
::=
SELECT <ALL | DISTINCT>
::=
*
| column <AS column-alias>
| expression <AS column-alias>
| table.*
| table-alias.*
| table.column <AS column-alias>
::=
FROM <, ...>
<WHERE >
<GROUP BY <, ...>>
<HAVING >
::=
table <<AS> alias>
| CONNECTION TO catalog () <<AS> table-alias>
| () <AS> alias
|
::=
|
|
::=
CROSS JOIN
::=
<> JOIN
::=
NATURAL <> JOIN
::=
INNER
| LEFT <OUTER>
| RIGHT <OUTER>
| FULL <OUTER>
::=
ON
| USING (column <, ...column>)
::=
{
<NOT> { | ()}
<{AND | OR} <NOT> { | ()}>
}
<,... {<NOT> { | ()}
<{AND | OR} <NOT> { | ()}>}>
::=
expression {operator | predicate} expression
::=
{order-by-expression <ASC | DESC>} <, ...order-by-expression <ASC | DESC>>
::=
column <, ...column>
| column-position-number
|
Retrieves columns and rows of data from tables.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench
UPDATE table
{
SET column= <, ...column=>
| column=value-expression <, ...column=value-expression>
}
<WHERE | value-expression>;
Modifies a column's values in existing rows of a table.
Product: SAS Federation Server
Document: SAS FedSQL Language Reference for SAS Viya Workbench

SAS/ACCESS Interface to SYSTEM 2000

Name
Syntax and Description
LIBNAME libref JMP 'path' <FMTLIB=libref.format-catalog>;
Associates a libref with a JMP data table and enables you to read and write JMP data tables.
Product: SAS/ACCESS Interface to SYSTEM 2000
Document: SAS/ACCESS Interface to PC Files: Reference for SAS Viya Workbench
LIBNAME libref PCFILES SAS/ACCESS-connection-options SAS/ACCESS-LIBNAME-options;
LIBNAME libref CLEAR | _ALL_ CLEAR;
LIBNAME libref LIST | _ALL_ LIST;
Associates a SAS libref with a Microsoft Excel workbook or Access database or with an ODBC data source.
Product: SAS/ACCESS Interface to SYSTEM 2000
Document: SAS/ACCESS Interface to PC Files: Reference for SAS Viya Workbench
LIBNAME < libref> XLSX <'physical-path and filename.xlsx'>
<SAS/ACCESS LIBNAME-options>;
LIBNAME libref CLEAR | _ALL_ ;
LIBNAME libref LIST | _ALL_ ;
Associates a SAS libref with a Microsoft Excel workbook that resides on Linux. SAS PC Files Server is not required.
Product: SAS/ACCESS Interface to SYSTEM 2000
Document: SAS/ACCESS Interface to PC Files: Reference for SAS Viya Workbench

SAS/GRAPH

A F G L P S T

Name
Syntax and Description
AXIS<1-99> <options>;
Controls the location, values, and appearance of the axes in plots and charts.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
FOOTNOTE<1-10> <ods-format-options> <text-options><'text-string'>;
Controls the content, appearance, and placement of text in a footnote.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
GOPTIONS <options-list>;
Temporarily sets default values for many graphics attributes and device parameters used by SAS/GRAPH procedures.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
LEGEND<1 - 99> <options>;
Controls the location and appearance of legends on two-dimensional plots, contour plots, and charts.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
PATTERN<1 - 255>
<COLOR=pattern-color | _style_>
<IMAGE=fileref | "external-file">
<IMAGESTYLE=TILE | FIT>
<REPEAT=number-of-times>
<VALUE=bar/block-pattern | plot-pattern | pie/star-pattern>;
Defines the characteristics of patterns used in graphs.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
SYMBOL<1 - 255>
<COLOR=symbol-color | _style_>
<MODE=EXCLUDE | INCLUDE>
<REPEAT=number-of-times>
<STEP=distance<units>>
<BWIDTH=box-width>
<CI=line-color | _style_>
<CO=color>
<CV=value-color | _style_>
<FONT="font">
<HEIGHT=symbol-height<units>>
<LINE=line-type>
<POINTLABEL<=(label-description(s)) | NONE>>
<VALUE=special-symbol | text-string | SPECIAL | NONE>
<WIDTH=thickness-factor>
<INTERPOL=interpolation-option>
<SINGULAR=n>;
Defines the characteristics of symbols that display the data plotted by a PLOT statement used by the GBARLINE, GCONTOUR, and GPLOT procedures.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
TITLE<1-10> <ods-format-options> <text-options> <'text-string'>;
Specifies title lines for SAS output.
Product: SAS/GRAPH
Document: SAS/GRAPH: Reference for SAS Viya Workbench
Last updated: June 5, 2026