You are on page 1of 40

Categories and Descriptions of Data Set Options

Description
Category Data Set Option Syntax
Data Set Control ALTER= ALTER=alter- Assigns an alter password to a SAS file and enables access to a password-
password protected SAS file. Alter-password must be a SAS name.

BUFNO= BUFNO=number-of- Specifies the number of buffers for processing a SAS data set. Specifies a
buffers value from 1 to the maximum number of buffers available in your operating
environment.

BUFSIZE= BUFSIZE=number- specifies the minimum number of bytes in a page in the data set. The
of-bytes number of bytes can have a value from 0, the system default, to the
maximum value allowed by your operating environment. If the value is 0,
SAS chooses an operating environment default that is optimal for the SAS
data set. If any value you specify is not adequate, SAS automatically rounds
up to the next buffer size for the data set.

CNTLLEV= CNTLLEV=LIB | LIB: controls concurrent access at the library level. Library-level control
MEM | REC restricts concurrent access to only one update process to the library.

MEM: controls concurrent access at the SAS data set (or member) level.
Member-level control restricts concurrent access to only one update or
output process but allows read access to many sessions, procedures, or
statements.

REC: controls concurrent access at the observation (or record) level.


Record-level control allows more than one update access to the same SAS
data set, but it denies concurrent update of the same observation.

COMPRESS= COMPRESS= YES | YES | CHAR: pecifies that the observations in a newly created SAS output
NO | CHAR | data set are compressed (variable-length records).
BINARY
NO: specifies that the observations in a newly created SAS data set are
uncompressed (fixed-length records).

BINARY: specifies that observations in a newly created SAS output data


set are compressed.

DLDMGACTION= DLDMGACTION=FA FAIL: stops the step, issues an error message to the log immediately. This
IL | ABORT | is the default for batch mode.
REPAIR | PROMPT
ABORT: terminates the step, issues an error message to the log, and
aborts the SAS session.

REPAIR: automatically repairs and rebuilds indexes and integrity


constraints. It issues a warning message to the log. This is the default for
interactive mode.

PROMPT: displays a requestor window that asks you to select the FAIL,
ABORT, or REPAIR action.

ENCRYPT= ENCRYPT=YES | YES: encrypts the file. The encryption method uses passwords. At a
NO minimum, you must specify the READ= or the PW= data set option at the
same time that you specify ENCRYPT=YES. Because the encryption
method uses passwords, you cannot change any password on an
encrypted data set without re-creating the data set.

NO: does not encrypt the file.

GENMAX= GENMAX=number- equests generations for a data set and specifies the maximum number of
of-generations versions to maintain. The value can be from 0 to 1000. The default is
GENMAX=0, which means that generations is not in effect.

GENNUM= GENNUM=integer is a number that references a specific version from a generation group.
Specifying a positive number is an absolute reference to a specific version
number that is appended to a data set's name. Specifying a negative
number is a relative reference to a version in relation to the base version,
from the youngest to the oldest. A value of 0 refers to the current (base)
version. Specify an asterisk for integer when you rename the entire
generation group for a data set.

INDEX= INDEX=(index- names and describes a simple or a composite index to be built. Index-
specification-1 specification has this form:
...<index-
specification-n>) index: is the name of a variable that forms the index or the name you
choose for a composite index.
index <= UNIQUE: specifies that the values of the key variables must be unique. If
(variable(s)) > you specify UNIQUE for a new data set and multiple observations have the
</UNIQUE> same values for the index variables, the index is not created. A slash (/)
</NOMISS> must precede the UNIQUE option.

NOMISS: excludes all observations with missing values from the index.
Observations with missing values are still read from the data set but not
through the index. A slash (/) must precede the NOMISS option.

LABEL= LABEL='label' It is a text string of up to 256 characters. If the label text contains single
quotation marks, use double quotation marks around the label, or use two
single quotation marks in the label text and surround the string with single
quotation marks. To remove a label from a data set, assign a label that is
equal to a blank that is enclosed in quotation marks.

OUTREP= OUTREP=format- specifies the requirements vector for the output file. For example, specify
type OUTREP=PC_ANSI if you want a file in PC format with characters that are
encoded in ANSI ASCII

PW= PW=password The PW= option applies to all types of SAS files except catalogs. You can
use this option to assign a password to a SAS file or to access a password-
protected SAS file.

PWREQ= PWREQ=YES|NO YES: specifies that a requestor window appear.

NO: prevents a requestor window from appearing. If a missing or invalid


password is entered, the data set is not opened and an error message is
written to the SAS log.

READ= READ=read- The READ= option applies to all types of SAS files except catalogs. You
password can use this option to assign a read-password to a SAS file or to access a
read-protected SAS file.

REPEMPTY= REPEMPTY=YES | YES: specifies that a new empty data set with a given name replaces an
NO existing data set with the same name. This is the default. When
REPEMPTY=YES and REPLACE=NO, then the data set is not replaced.

NO: specifies that a new empty data set with a given name does not
replace an existing data set with the same name.

REPLACE= REPLACE=NO | YES NO: specifies that a new data set with a given name does not replace an
existing data set with the same name.

YES: specifies that a new data set with a given name replaces an existing
data set with the same name.

REUSE= REUSE=NO | YES NO: does not track and reuse space in compressed data sets. New
observations are appended to the existing data set. Specifying the NO
argument results in less efficient data storage if you delete or update many
observations in the SAS data set.

YES: racks and reuses space in compressed SAS data sets. New
observations are inserted in the space that is freed when other
observations are updated or deleted.

SORTEDBY= SORTEDBY=by- by-clause < / collate-name>: indicates how the data are currently sorted.
clause </ collate-
name> | _NULL_
by-clause: are the variables and options that you use in a BY statement in
a PROC SORT step.

collate-name: names the collating sequence that is used for the sort. By
default, the collating sequence is that of your operating environment. A
slash (/) must precede the collating sequence.

_NULL_: removes any existing sort information.

TOBSNO= TOBSNO=n Specifies the number of observations to be transmitted in each multi-


observation exchange with a SAS server

TRANTAB= TRANTAB=table- specifies the name of a translation table that is used to translate the
name characters in a data set from foreign encoding to local encoding. SAS
searches for translation tables in SASUSER.PROFILE first and then
SASUSER.HOST.

TYPE= TYPE=data-set-type Specifies the data set type for a specially structured SAS data set

WRITE= WRITE=write- The WRITE= option applies to all types of SAS files except catalogs. You
password can use this option to assign a write-password to a SAS file or to access a
write-protected SAS file.

Miscellaneous FILECLOSE= FILECLOSE=DISP | DISP: positions the tape volume according to the disposition specified in
LEAVE | REREAD | the operating environment's control language
REWIND
LEAVE: positions the tape at the end of the file that was just processed.
Use FILECLOSE=LEAVE if you are not repeatedly accessing the same files
in a SAS program but you are accessing one or more subsequent SAS files
on the same tape.

REREAD: positions the tape volume at the beginning of the file that was
just processed. Use FILECLOSE=REREAD if you are accessing the same
SAS data set on tape several times in a SAS program.

REWIND: rewinds the tape volume to the beginning. Use


FILECLOSE=REWIND if you are accessing one or more previous SAS files
on the same tape, but you are not repeatedly accessing the same files in a
SAS program.
Observation FIRSTOBS= FIRSTOBS=n n is a positive integer that is less than or equal to the number of
Control observations in the data set.

IN= IN=variable variable: names the new variable whose value indicates whether that input
data set contributed data to the current observation. Within the DATA step,
the value of the variable is 1 if the data set contributed to the current
observation, and 0 otherwise.

OBS= OBS=n|MAX n specifies a positive integer that is less than or equal to the number of
observations in the data set or zero.

MAX represents the total number of observations in the data set.

POINTOBS= POINTOBS= YES | Controls whether a compressed data set may be processed with random
NO access (by observation number) rather than sequential access only

WHERE= WHERE=(where- where-expression is an arithmetic or logical expression that consists of a


expression) sequence of operators, operands, and SAS functions. The expression must
be enclosed in parentheses.

WHEREUP= WHEREUP= NO | NO: does not evaluate added observations and modified observations
YES against a WHERE expression.

YES: evaluates added observations and m odified observations against a


WHERE expression.

User Control of IDXNAME= IDXNAME=index- index-name:specifies the name (up to 32 characters) of a simple or
SAS Index name composite index for the SAS data set. SAS does not attempt to determine if
Usage the specified index is the best one or if a sequential search might be more
resource-efficient.

IDXWHERE= IDXWHERE=YES| YES: tells SAS to choose the best index to optimize a WHERE expression,
NO and to disregard the possibility that a sequential search of the data set
might be more resource-efficient.

NO: tells SAS to ignore all indexes and satisfy the conditions of a WHERE
expression with a sequential search of the data set.

Variable Control DROP= DROP=variable(s) Variable(s): lists one or more variable names. You can list the variables in
any form that SAS allows

KEEP= KEEP=variable(s) Variable: lists one or more variable names. You can list the variables in any
form that SAS allows.

RENAME= RENAME=(old- Changes the name of a variable


name-1=new-name-
1 < . . . old-name-
n=new-name-n>)
ions of Data Set Options
Example

Example: This example creates an encrypted SAS data set:


data salary(encrypt=yes read=green);
input name $ yrsal bonuspct;
datalines;
Muriel 34567 3.2
Bjorn 74644 2.5
Freda 38755 4.1
Benny 29855 3.5
Agnetha 70998 4.1;

To use this data set, specify the read password: proc contents
data=salary(read=green);
run;

Example 1: Requesting Generations When You Create a Data Set, This example shows how to request
generations for a new data set. The DATA step creates a data set namedWORK.A that can have as
many as 10 generations (one current version and nine historical versions):
data a(genmax=10);
x=1;
output;
run;

Example 2: Modifying the Number of Generations on an Existing Data Set, This example shows how to
change the number of generations on the data set MYLIB.A to 4:
proc datasets lib=mylib;
modify a(genmax=4);
run;

Example 1: Defining a Simple Index The following INDEX= data set option defines a simple index for the
SSN variable: data new(index=(ssn));

Example 2: Defining a Composite Index, The following INDEX= data set option defines a composite
index named CITYST that uses the CITY and STATE variables: data new(index=(cityst=(city state)));
Example 3: Defining a Simple and a Composite Index, The following INDEX= data set option defines a
simple index for SSN and a composite index for CITY and STATE: data
new(index=(ssn cityst=(city state)));

Example: These examples assign labels to data sets:


data w2(label='1976 W2 Info, Hourly');
data new(label='Peter''s List');
data new(label="Hillside's Daily Account");
data sales(label='Sales For May(NE)');

If you plan to use procedures that add observations to the end of SAS data sets (for example, the
APPEND and FSEDIT procedures) with compressed data sets, use the REUSE=NO argument.
REUSE=YES causes new observations to be added wherever there is space in the file, not necessarily at
the end of the file.

This example uses the SORTEDBY= data set option to specify how the data are currently sorted. The
data set ORDERS is sorted by PRIORITY and by the descending values of INDATE. Once the data set is
created, the sort information is stored with it. These statements create the data set ORDERS and record
the sort information: libname mylib 'SAS-data-library';
options yearcutoff=1920;
data mylib.orders(sortedby=priority
descending indate);
input priority 1. +1 indate date7.
+1 office $ code $;
format indate date7.;
datalines;
1 03may01 CH J8U
1 21mar01 LA M91
1 01dec00 FW L6R
1 27feb99 FW Q2A
2 15jan00 FW I9U
2 09jul99 CH P3Q
3 08apr99 CH H5T
3 31jan99 FW D2W
;
This PROC step prints the data set STUDY beginning with observation 20: proc print
data=study(firstobs=20);
run; This SET statement uses both FIRSTOBS= and OBS= to read only observations 5 through 10 from
the data set STUDY. Data set NEW contains six observations. data new;
set study(firstobs=5 obs=10);
run;

Example: In this example, IN= creates a new variable, OVERSEAS, that denotes international flights.
The variable I has a value of 1 when the observation is read from the NONUSA data set; otherwise, it has
a value of 0. The IF-THEN statement checks the value of I to determine if the data set NONUSA
contributed data to the current observation. If I=1, the variable OVERSEAS receives an asterisk (*) as a
value. data allflts;
set usa nonusa(in=i);
by fltnum;
if i then overseas='*';
run;

Example: In this example, the OBS= data set option in the SET statement reads in the first ten
observations from data set OLD: data new;
set old(obs=10);
run; This statement prints only observations 5 through 10 in data set STUDY: proc print
data=study(firstobs=5 obs=10);

Example 1: Accepting Updates That Do Not Match the WHERE expression, This example shows how
WHEREUP= permits observations to be updated and added even though the modified observation does
not match the WHERE expression: data a;
x=1;
output;
x=2;
output;
run;

data a;
modify a(where=(x=1)
Example whereup=no);
1: Using a Specific Index, This example uses the IDXNAME= data set option to direct SAS to
x=3;
use a specific index to optimize the WHERE expression. SAS then disregards the possibility that a
replace; /* Update does not
sequential search of the data set match WHERE
might expression
be more */
resource-efficient and does not attempt to determine if
output;
the /* Add
specified does
index is not match
the best WHERE
one expression */
data mydata.empnew;
run;
setExample 2: Rejecting
mydata.employee Updates That Do Not Match the WHERE expression In this example,
(idxname=empnum);
WHEREUP=
where empnum does<not permit observations to be updated or added when the update and the add do not
2000;
match the WHERE expression: data a;
x=1;
output;
Example
x=2; 1: Specifying Index Usage This example uses the IDXWHERE= data set option to tell SAS to
decide
output;which index is the best to optimize the WHERE expression. SAS then disregards the possibility
that
run; a sequential search of the data set might be more resource-efficient: data mydata.empnew;
set mydata.employee (idxwhere=yes);
where
data a; empnum < 2000;
modify a(where=(x=1) whereup=yes);
x=3;
replace; /* Update does not match WHERE expression */
Example
output; /*1:Add
Excluding Variables
does not from Input,
match WHERE In this example,
expression */ the variables SALARY and GENDER are
not
run;included in processing and they are not written to either output data set: data plan1 plan2;
set payroll(drop=salary gender);
if hired<'01jan98'd then output plan1;
else output plan2;
run; You cannot use SALARY or GENDER in any logic in the DATA step because DROP= prevents the
SET statement from reading them from PAYROLL. Example 2: Processing Variables without Writing
Them to a Data Set, In this example, SALARY and GENDER are not written to PLAN2, but they are
written to PLAN1: data plan1 plan2(drop=salary gender);
set payroll;
if hired<'01jan98'd then output plan1;
else output plan2;
run;

Example: In this example, only IDNUM and SALARY are read from PAYROLL, and they are the only
variables in PAYROLL that are available for processing: data bonus;
set payroll(keep=idnum salary);
bonus=salary*1.1;
run;

Example 1: Renaming a Variable at Time of Output This example uses RENAME= in the DATA
statement to show that the variable is renamed at the time it is written to the output data set. The variable
keeps its original name, X, during the DATA step processing: data two(rename=(x=keys));
set one;
z=x+y;
run;
Example 2: Renaming a Variable at Time
of Input, This example renames variable X to a variable named KEYS in the SET statement, which is a
rename before DATA step processing. KEYS, not X, is the name to use for the variable for DATA step
processing. data three;
set one(rename=(x=keys));
z=keys+y;
run;
Categories and Descriptions of Formats
Category Format Description
Character $ASCIIw. Converts native format character data to ASCII representation

$BINARYw. Converts character data to binary representation

$CHARw. Writes standard character data

$EBCDICw. Converts native format character data to EBCDIC representation

$HEXw. Converts character data to hexadecimal representation

$MSGCASEw. Writes character data in uppercase when the MSGCASE system option is in effect

$OCTALw. Converts character data to octal representation

$QUOTEw. Writes data values that are enclosed in double quotation marks

$REVERJw. Writes character data in reverse order and preserves blanks

$REVERSw. Writes character data in reverse order and left aligns

$UPCASEw. Converts character data to uppercase

$VARYINGw. Writes character data of varying length

$w. Writes standard character data

DBCS $KANJIw. Adds shift-code data to DBCS data

$KANJIXw. Removes shift code data from DBCS data

Date and Time DATEw. Writes date values in the form ddmmmyy or ddmmmyyyy

DATEAMPMw.d Writes datetime values in the form ddmmmyy:hh:mm:ss.ss with AM or PM

DATETIMEw.d Writes datetime values in the form ddmmmyy:hh:mm:ss.ss

DAYw. Writes date values as the day of the month

DDMMYYw. Writes date values in the form ddmmyy or ddmmyyyy

DDMMYYxw. Writes date values in the form ddmmyy or ddmmyyyy with a specified separator

DOWNAMEw. Writes date values as the name of the day of the week

EURDFDDw. Writes international date values in the form dd.mm.yy or dd.mm.yyyy

EURDFDEw. Writes international date values in the form ddmmmyy or ddmmmyyyy

EURDFDNw. Writes international date values as the day of the week

EURDFDTw.d Writes international datetime values in the form ddmmmyy:hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss

EURDFDWNw. Writes international date values as the name of the day

EURDFMNw. Writes international date values as the name of the month

EURDFMYw. Writes international date values in the form mmmyy or mmmyyyy

EURDFWDXw. Writes international date values as the name of the month, the day, and the year in the form dd month-name yy (or yyyy )

EURDFWKXw. Writes international date values as the name of the day and date in the form day-of-week, dd month-name yy (or yyyy)

HHMMw.d Writes time values as hours and minutes in the form hh:mm

HOURw.d Writes time values as hours and decimal fractions of hours

JULDAYw. Writes date values as the Julian day of the year

JULIANw. Writes date values as Julian dates in the form yyddd or yyyyddd

MINGUOw. Writes date values as Taiwanese dates in the form yyymmdd

MMDDYYw. Writes date values in the form mmddyy or mmddyyyy

MMDDYYxw. Writes date values in the form mmddyy or mmddyyyy with a specified separator

MMSSw.d Writes time values as the number of minutes and seconds since midnight

MMYYxw. Writes date values as the month and the year and separates them with a character

MONNAMEw. Writes date values as the name of the month

MONTHw. Writes date values as the month of the year

MONYYw. Writes date values as the month and the year in the form mmmyy or mmmyyyy

NENGOw. Writes date values as Japanese dates in the form e.yymmdd

PDJULGw. Writes packed Julian date values in the hexadecimal format yyyydddF for IBM

PDJULIw. Writes packed Julian date values in the hexadecimal format ccyydddF for IBM

QTRw. Writes date values as the quarter of the year

QTRRw. Writes date values as the quarter of the year in Roman numerals

TIMEw.d Writes time values as hours, minutes, and seconds in the form hh:mm:ss.ss

TIMEAMPMw.d Writes time values as hours, minutes, and seconds in the form hh:mm:ss.ss with AM or PM

TODw.d Writes the time portion of datetime values in the form hh:mm:ss.ss
WEEKDATEw. Writes date values as the day of the week and the date in the form day-of-week, month-name dd, yy (or yyyy)

WEEKDATXw. Writes date values as day of week and date in the form day-of-week, dd month-name yy (or yyyy)

WEEKDAYw. Writes date values as the day of the week

WORDDATEw. Writes date values as the name of the month, the day, and the year in the form month-name dd, yyyy

WORDDATXw. Writes date values as the day, the name of the month, and the year in the form dd month-name yyyy

YEARw. Writes date values as the year

YYMMxw. Writes date values as the year and month and separates them with a character

YYMMDDw. Writes date values in the form yymmdd or yyyymmdd

YYMMDDxw. Writes date values in the form yymmdd or yyyymmdd with a specified separator

YYMONw. Writes date values as the year and the month abbreviation

YYQxw. Writes date values as the year and the quarter and separates them with a character

YYQRxw. Writes date values as the year and the quarter in Roman numerals and separates them with characters

Numeric BESTw. SAS chooses the best notation

BINARYw. Converts numeric values to binary representation

COMMAw.d Writes numeric values with commas and decimal points

COMMAXw.d Writes numeric values with periods and commas

Dw.s Prints variables, possibly with a great range of values, lining up decimal places for values of similar magnitude

DOLLARw.d Writes numeric values with dollar signs, commas, and decimal points

DOLLARXw.d Writes numeric values with dollar signs, periods, and commas

Ew. Writes numeric values in scientific notation

FLOATw.d Generates a native single-precision, floating-point value by multiplying a number by 10 raised to the dth power

FRACTw. Converts numeric values to fractions

HEXw. Converts real binary (floating-point) values to hexadecimal representation

IBw.d Writes native integer binary (fixed-point) values, including negative values

IBRw.d Writes integer binary (fixed-point) values in Intel and DEC formats

IEEEw.d Generates an IEEE floating-point value by multiplying a number by 10 raised to the dth power

NEGPARENw.d Writes negative numeric values in parentheses

NUMXw.d Writes numeric values with a comma in place of the decimal point

OCTALw. Converts numeric values to octal representation

PDw.d Writes data in packed decimal format

PERCENTw.d Writes numeric values as percentages

PIBw.d Writes positive integer binary (fixed-point) values

PIBRw.d Writes positive integer binary (fixed-point) values in Intel and DEC formats

PKw.d Writes data in unsigned packed decimal format

PVALUEw.d Writes p-values

RBw.d Writes real binary data (floating-point) in real binary format

ROMANw. Writes numeric values as Roman numerals

SSNw. Writes Social Security numbers

S370FFw.d Writes native standard numeric data in IBM mainframe format

S370FIBw.d Writes integer binary (fixed-point) values, including negative values, in IBM mainframe format

S370FIBUw.d Writes unsigned integer binary (fixed-point) values in IBM mainframe format

S370FPDw.d Writes packed decimal data in IBM mainframe format

S370FPDUw.d Writes unsigned packed decimal data in IBM mainframe format

S370FPIBw.d Writes positive integer binary (fixed-point) values in IBM mainframe format

S370FRBw.d Writes real binary (floating-point) data in IBM mainframe format

S370FZDw.d Writes zoned decimal data in IBM mainframe format

S370FZDLw.d Writes zoned decimal leading sign data in IBM mainframe format

S370FZDSw.d Writes zoned decimal separate leading-sign data in IBM mainframe format

S370FZDTw.d Writes zoned decimal separate trailing-sign data in IBM mainframe format

S370FZDUw.d Writes unsigned zoned decimal data in IBM mainframe format

w.d Writes standard numeric data one digit per byte

WORDFw. Writes numeric values as words with fractions that are shown numerically

WORDSw. Writes numeric values as words


YENw.d Writes numeric values with yen signs, commas, and decimal points

Zw.d Writes standard numeric data with leading 0s

ZDw.d Writes numeric data in zoned decimal format


Functions and CALL Routines by Category
Functions and CALL
Category Description
Routine
Array DIM Returns the number of elements in an array

HBOUND Returns the upper bound of an array

LBOUND Returns the lower bound of an array

Bitwise Logical BAND Returns the bitwise logical AND of two arguments
Operations
BLSHIFT Returns the bitwise logical left shift of two arguments

BNOT Returns the bitwise logical NOT of an argument

BOR Returns the bitwise logical OR of two arguments

BRSHIFT Returns the bitwise logical right shift of two arguments

BXOR Returns the bitwise logical EXCLUSIVE OR of two arguments

Character String CALL RXCHANGE Changes one or more substrings that match a pattern
Matching
CALL RXFREE Frees memory allocated by other regular expression (RX) functions and CALL routines

CALL RXSUBSTR Finds the position, length, and score of a substring that matches a pattern

RXMATCH Finds the beginning of a substring that matches a pattern and returns a value

RXPARSE Parses a pattern and returns a value

Character BYTE Returns one character in the ASCII or the EBCDIC collating sequence

COLLATE Returns an ASCII or EBCDIC collating sequence character string

COMPBL Removes multiple blanks from a character string

COMPRESS Removes specific characters from a character string

DEQUOTE Removes quotation marks from a character value

INDEX Searches a character expression for a string of characters

INDEXC Searches a character expression for specific characters

INDEXW Searches a character expression for a specified string as a word

LEFT Left aligns a SAS character expression

LENGTH Returns the length of an argument

LOWCASE Converts all letters in an argument to lowercase

MISSING Returns a numeric result that indicates whether the argument contains a missing value

QUOTE Adds double quotation marks to a character value

RANK Returns the position of a character in the ASCII or EBCDIC collating sequence

REPEAT Repeats a character expression

REVERSE Reverses a character expression

RIGHT Right aligns a character expression

SCAN Selects a given word from a character expression

SOUNDEX Encodes a string to facilitate searching

SPEDIS Determines the likelihood of two words matching, expressed as the asymmetric spelling
distance between the two words
SUBSTR (left of =) Replaces character value contents

SUBSTR (right of =) Extracts a substring from an argument

TRANSLATE Replaces specific characters in a character expression

TRANWRD Replaces or removes all occurrences of a word in a character string

TRIM Removes trailing blanks from character expressions and returns one blank if the expression
is missing
TRIMN Removes trailing blanks from character expressions and returns a null string (zero blanks) if
the expression is missing
UPCASE Converts all letters in an argument to uppercase

VERIFY Returns the position of the first character that is unique to an expression

DBCS KCOMPARE Returns the result of a comparison of character strings

KCOMPRESS Removes specific characters from a character string

KCOUNT Returns the number of double-byte characters in a string

KINDEX Searches a character expression for a string of characters

KINDEXC Searches a character expression for specific characters

KLEFT Left aligns a SAS character expression by removing unnecessary leading DBCS blanks and
SO/SI
KLENGTH Returns the length of an argument

KLOWCASE Converts all letters in an argument to lowercase

KREVERSE Reverses a character expression

KRIGHT Right aligns a character expression by trimming trailing DBCS blanks and SO/SI

KSCAN Selects a given word from a character expression

KSTRCAT Concatenates two or more character strings

KSUBSTR Extracts a substring from an argument

KSUBSTRB Extracts a substring from an argument based on byte position


KTRANSLATE Replaces specific characters in a character expression

KTRIM Removes trailing DBCS blanks and SO/SI from character expressions

KTRUNCATE Truncates a numeric value to a specified length

KUPCASE Converts all single-byte letters in an argument to uppercase

KUPDATE Inserts, deletes, and replaces character value contents

KUPDATEB Inserts, deletes, and replaces character value contents based on byte unit

KVERIFY Returns the position of the first character that is unique to an expression

Date and Time DATDIF Returns the number of days between two dates

DATE Returns the current date as a SAS date value

DATEJUL Converts a Julian date to a SAS date value

DATEPART Extracts the date from a SAS datetime value

DATETIME Returns the current date and time of day as a SAS datetime value

DAY Returns the day of the month from a SAS date value

DHMS Returns a SAS datetime value from date, hour, minute, and second

HMS Returns a SAS time value from hour, minute, and second values

HOUR Returns the hour from a SAS time or datetime value

INTCK Returns the integer number of time intervals in a given time span

INTNX Advances a date, time, or datetime value by a given interval, and returns a date, time, or
datetime value
JULDATE Returns the Julian date from a SAS date value

JULDATE7 Returns a seven-digit Julian date from a SAS date value

MDY Returns a SAS date value from month, day, and year values

MINUTE Returns the minute from a SAS time or datetime value

MONTH Returns the month from a SAS date value

QTR Returns the quarter of the year from a SAS date value

SECOND Returns the second from a SAS time or datetime value

TIME Returns the current time of day

TIMEPART Extracts a time value from a SAS datetime value

TODAY Returns the current date as a SAS date value

WEEKDAY Returns the day of the week from a SAS date value

YEAR Returns the year from a SAS date value

YRDIF Returns the difference in years between two dates

YYQ Returns a SAS date value from the year and quarter

Descriptive CSS Returns the corrected sum of squares


Statistics
CV Returns the coefficient of variation

KURTOSIS Returns the kurtosis

MAX Returns the largest value

MEAN Returns the arithmetic mean (average)

MIN Returns the smallest value

MISSING Returns a numeric result that indicates whether the argument contains a missing value

N Returns the number of nonmissing values

NMISS Returns the number of missing values

ORDINAL Returns any specified order statistic

RANGE Returns the range of values

SKEWNESS Returns the skewness

STD Returns the standard deviation

STDERR Returns the standard error of the mean

SUM Returns the sum of the nonmissing arguments

USS Returns the uncorrected sum of squares

VAR Returns the variance

External Files DCLOSE Closes a directory that was opened by the DOPEN function and returns a value

DINFO Returns information about a directory

DNUM Returns the number of members in a directory

DOPEN Opens a directory and returns a directory identifier value

DOPTNAME Returns directory attribute information

DOPTNUM Returns the number of information items that are available for a directory

DREAD Returns the name of a directory member

DROPNOTE Deletes a note marker from a SAS data set or an external file and returns a value

FAPPEND Appends the current record to the end of an external file and returns a value

FCLOSE Closes an external file, directory, or directory member, and returns a value
FCOL Returns the current column position in the File Data Buffer (FDB)

FDELETE Deletes an external file or an empty directory

FEXIST Verifies the existence of an external file associated with a fileref and returns a value

FGET Copies data from the File Data Buffer (FDB) into a variable and returns a value

FILEEXIST Verifies the existence of an external file by its physical name and returns a value

FILENAME Assigns or deassigns a fileref for an external file, directory, or output device and returns a
value
FILEREF Verifies that a fileref has been assigned for the current SAS session and returns a value

FINFO Returns the value of a file information item

FNOTE Identifies the last record that was read and returns a value that FPOINT can use

FOPEN Opens an external file and returns a file identifier value

FOPTNAME Returns the name of an item of information about a file

FOPTNUM Returns the number of information items that are available for an external file

FPOINT Positions the read pointer on the next record to be read and returns a value

FPOS Sets the position of the column pointer in the File Data Buffer (FDB) and returns a value

FPUT Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB's current
column position, and returns a value
FREAD Reads a record from an external file into the File Data Buffer (FDB) and returns a value

FREWIND Positions the file pointer to the start of the file and returns a value

FRLEN Returns the size of the last record read, or, if the file is opened for output, returns the
current record size
FSEP Sets the token delimiters for the FGET function and returns a value

FWRITE Writes a record to an external file and returns a value

MOPEN Opens a file by directory id and member name, and returns the file identifier or a 0

PATHNAME Returns the physical name of a SAS data library or of an external file, or returns a blank

SYSMSG Returns the text of error messages or warning messages from the last data set or external
file function execution
SYSRC Returns a system error number

External Routines CALL MODULE Calls the external routine without any return code

CALL MODULEI Calls the external routine without any return code (in IML environment only)

MODULEC Calls an external routine and returns a character value

MODULEIC Calls an external routine and returns a character value (in IML environment only)

MODULEIN Calls an external routine and returns a numeric value (in IML environment only)

MODULEN Calls an external routine and returns a numeric value

Financial COMPOUND Returns compound interest parameters

CONVX Returns the convexity for an enumerated cashflow

CONVXP Returns the convexity for a periodic cashflow stream, such as a bond

DACCDB Returns the accumulated declining balance depreciation

DACCDBSL Returns the accumulated declining balance with conversion to a straight-line depreciation

DACCSL Returns the accumulated straight-line depreciation

DACCSYD Returns the accumulated sum-of-years-digits depreciation

DACCTAB Returns the accumulated depreciation from specified tables

DEPDB Returns the declining balance depreciation

DEPDBSL Returns the declining balance with conversion to a straight-line depreciation

DEPSL Returns the straight-line depreciation

DEPSYD Returns the sum-of-years-digits depreciation

DEPTAB Returns the depreciation from specified tables

DUR Returns the modified duration for an enumerated cashflow

DURP Returns the modified duration for a periodic cashflow stream, such as a bond

INTRR Returns the internal rate of return as a fraction

IRR Returns the internal rate of return as a percentage

MORT Returns amortization parameters

NETPV Returns the net present value as a fraction

NPV Returns the net present value with the rate expressed as a percentage

PVP Returns the present value for a periodic cashflow stream, such as a bond

SAVING Returns the future value of a periodic saving

YIELDP Returns the yield-to-maturity for a periodic cashflow stream, such as a bond

Hyperbolic COSH Returns the hyperbolic cosine

SINH Returns the hyperbolic sine

TANH Returns the hyperbolic tangent

Macro CALL EXECUTE Resolves an argument and issues the resolved value for execution

CALL SYMPUT Assigns DATA step information to a macro variable


RESOLVE Returns the resolved value of an argument after it has been processed by the macro facility

SYMGET Returns the value of a macro variable during DATA step execution

Mathematical ABS Returns the absolute value

AIRY Returns the value of the airy function

CNONCT Returns the noncentrality parameter from a chi-squared distribution

COMB Computes the number of combinations of n elements taken r at a time and returns a value

CONSTANT Computes some machine and mathematical constants and returns a value

DAIRY Returns the derivative of the airy function

DEVIANCE Computes the deviance and returns a value

DIGAMMA Returns the value of the DIGAMMA function

ERF Returns the value of the (normal) error function

ERFC Returns the value of the complementary (normal) error function

EXP Returns the value of the exponential function

FACT Computes a factorial and returns a value

FNONCT Returns the value of the noncentrality parameter of an F distribution

GAMMA Returns the value of the Gamma function

IBESSEL Returns the value of the modified bessel function

JBESSEL Returns the value of the bessel function

LGAMMA Returns the natural logarithm of the Gamma function

LOG Returns the natural (base e) logarithm

LOG10 Returns the logarithm to the base 10

LOG2 Returns the logarithm to the base 2

MOD Returns the remainder value

PERM Computes the number of permutations of n items taken r at a time and returns a value

SIGN Returns the sign of a value

SQRT Returns the square root of a value

TNONCT Returns the value of the noncentrality parameter from the student's t distribution

TRIGAMMA Returns the value of the TRIGAMMA function

Probability CDF Computes cumulative distribution functions

LOGPDF Computes the logarithm of a probability (mass) function

LOGSDF Computes the logarithm of a survival function

PDF Computes probability density (mass) functions

POISSON Returns the probability from a Poisson distribution

PROBBETA Returns the probability from a beta distribution

PROBBNML Returns the probability from a binomial distribution

PROBBNRM Computes a probability from the bivariate normal distribution and returns a value

PROBCHI Returns the probability from a chi-squared distribution

PROBF Returns the probability from an F distribution

PROBGAM Returns the probability from a gamma distribution

PROBHYPR Returns the probability from a hypergeometric distribution

PROBMC Computes a probability or a quantile from various distributions for multiple comparisons of
means, and returns a value
PROBNEGB Returns the probability from a negative binomial distribution

PROBNORM Returns the probability from the standard normal distribution

PROBT Returns the probability from a t distribution

SDF Computes a survival function

Quantile BETAINV Returns a quantile from the beta distribution

CINV Returns a quantile from the chi-squared distribution

FINV Returns a quantile from the F distribution

GAMINV Returns a quantile from the gamma distribution

PROBIT Returns a quantile from the standard normal distribution

TINV Returns a quantile from the t distribution

Random Number CALL RANBIN Returns a random variate from a binomial distribution

CALL RANCAU Returns a random variate from a Cauchy distribution

CALL RANEXP Returns a random variate from an exponential distribution

CALL RANGAM Returns a random variate from a gamma distribution

CALL RANNOR Returns a random variate from a normal distribution

CALL RANPOI Returns a random variate from a Poisson distribution

CALL RANTBL Returns a random variate from a tabled probability distribution


CALL RANTRI Returns a random variate from a triangular distribution

CALL RANUNI Returns a random variate from a uniform distribution

NORMAL Returns a random variate from a normal distribution

RANBIN Returns a random variate from a binomial distribution

RANCAU Returns a random variate from a Cauchy distribution

RANEXP Returns a random variate from an exponential distribution

RANGAM Returns a random variate from a gamma distribution

RANNOR Returns a random variate from a normal distribution

RANPOI Returns a random variate from a Poisson distribution

RANTBL Returns a random variate from a tabled probability

RANTRI Random variate from a triangular distribution

RANUNI Returns a random variate from a uniform distribution

UNIFORM Random variate from a uniform distribution

SAS File I/O ATTRC Returns the value of a character attribute for a SAS data set

ATTRN Returns the value of a numeric attribute for the specified SAS data set

CEXIST Verifies the existence of a SAS catalog or SAS catalog entry and returns a value

CLOSE Closes a SAS data set and returns a value

CUROBS Returns the observation number of the current observation

DROPNOTE Deletes a note marker from a SAS data set or an external file and returns a value

DSNAME Returns the SAS data set name that is associated with a data set identifier

EXIST Verifies the existence of a SAS data library member

FETCH Reads the next nondeleted observation from a SAS data set into the Data Set Data Vector
(DDV) and returns a value
FETCHOBS Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV)
and returns a value

GETVARC Returns the value of a SAS data set character variable

GETVARN Returns the value of a SAS data set numeric variable

IORCMSG Returns a formatted error message for _IORC_

LIBNAME Assigns or deassigns a libref for a SAS data library and returns a value

LIBREF Verifies that a libref has been assigned and returns a value

NOTE Returns an observation ID for the current observation of a SAS data set

OPEN Opens a SAS data set and returns a value

PATHNAME Returns the physical name of a SAS data library or of an external file, or returns a blank

POINT Locates an observation identified by the NOTE function and returns a value

REWIND Positions the data set pointer at the beginning of a SAS data set and returns a value

SYSMSG Returns the text of error messages or warning messages from the last data set or external
file function execution
SYSRC Returns a system error number

VARFMT Returns the format assigned to a SAS data set variable

VARINFMT Returns the informat assigned to a SAS data set variable

VARLABEL Returns the label assigned to a SAS data set variable

VARLEN Returns the length of a SAS data set variable

VARNAME Returns the name of a SAS data set variable

VARNUM Returns the number of a variable's position in a SAS data set

VARTYPE Returns the data type of a SAS data set variable

Special ADDR Returns the memory address of a variable

CALL POKE Writes a value directly into memory

CALL SYSTEM Submits an operating environment command for execution

DIF Returns differences between the argument and its nth lag

GETOPTION Returns the value of a SAS system or graphics option

INPUT Returns the value produced when a SAS expression that uses a specified informat
expression is read
INPUTC Enables you to specify a character informat at run time

INPUTN Enables you to specify a numeric informat at run time

LAG Returns values from a queue

PEEK Stores the contents of a memory address into a numeric variable

PEEKC Stores the contents of a memory address into a character variable

POKE Writes a value directly into memory

PUT Returns a value using a specified format

PUTC Enables you to specify a character format at run time

PUTN Enables you to specify a numeric format at run time

SYSGET Returns the value of the specified operating environment variable


SYSPARM Returns the system parameter string

SYSPROD Determines if a product is licensed

SYSTEM Issues an operating environment command during a SAS session

State and ZIP Code FIPNAME Converts FIPS codes to uppercase state names

FIPNAMEL Converts FIPS codes to mixed case state names

FIPSTATE Converts FIPS codes to two-character postal codes

STFIPS Converts state postal codes to FIPS state codes

STNAME Converts state postal codes to uppercase state names

STNAMEL Converts state postal codes to mixed case state names

ZIPFIPS Converts ZIP codes to FIPS state codes

ZIPNAME Converts ZIP codes to uppercase state names

ZIPNAMEL Converts ZIP codes to mixed case state names

ZIPSTATE Converts ZIP codes to state postal codes

Trigonometric ARCOS Returns the arccosine

ARSIN Returns the arcsine

ATAN Returns the arctangent

COS Returns the cosine

SIN Returns the sine

TAN Returns the tangent

Truncation CEIL Returns the smallest integer that is greater than or equal to the argument

FLOOR Returns the largest integer that is less than or equal to the argument

FUZZ Returns the nearest integer if the argument is within 1E-12

INT Returns the integer value

ROUND Rounds to the nearest round-off unit

TRUNC Truncates a numeric value to a specified length

Variable Control CALL LABEL Assigns a variable label to a specified character variable

CALL SET Links SAS data set variables to DATA step or macro variables that have the same name
and data type
CALL VNAME Assigns a variable name as the value of a specified variable

Variable VARRAY Returns a value that indicates whether the specified name is an array
Information
VARRAYX Returns a value that indicates whether the value of the specified argument is an array

VFORMAT Returns the format that is associated with the specified variable

VFORMATD Returns the format decimal value that is associated with the specified variable

VFORMATDX Returns the format decimal value that is associated with the value of the specified argument

VFORMATN Returns the format name that is associated with the specified variable

VFORMATNX Returns the format name that is associated with the value of the specified argument

VFORMATW Returns the format width that is associated with the specified variable

VFORMATWX Returns the format width that is associated with the value of the specified argument

VFORMATX Returns the format that is associated with the value of the specified argument

VINARRAY Returns a value that indicates whether the specified variable is a member of an array

VINARRAYX Returns a value that indicates whether the value of the specified argument is a member of
an array
VINFORMAT Returns the informat that is associated with the specified variable

VINFORMATD Returns the informat decimal value that is associated with the specified variable

VINFORMATDX Returns the informat decimal value that is associated with the value of the specified
argument
VINFORMATN Returns the informat name that is associated with the specified variable

VINFORMATNX Returns the informat name that is associated with the value of the specified argument

VINFORMATW Returns the informat width that is associated with the specified variable

VINFORMATWX Returns the informat width that is associated with the value of the specified argument

VINFORMATX Returns the informat that is associated with the value of the specified argument

VLABEL Returns the label that is associated with the specified variable

VLABELX Returns the variable label for the value of a specified argument

VLENGTH Returns the compile-time (allocated) size of the specified variable

VLENGTHX Returns the compile-time (allocated) size for the value of the specified argument

VNAME Returns the name of the specified variable

VNAMEX Validates the value of the specified argument as a variable name

VTYPE Returns the type (character or numeric) of the specified variable

VTYPEX Returns the type (character or numeric) for the value of the specified argument

Web Tools HTMLDECODE Decodes a string containing HTML numeric character references or HTML character entity
references and returns the decoded string
HTMLENCODE Encodes characters using HTML character entity references and returns the encoded string

URLDECODE Returns a string that was decoded using the URL escape syntax
URLENCODE Returns a string that was encoded using the URL escape syntax
Description
Returns the number of elements in an array

Returns the upper bound of an array

Returns the lower bound of an array

Returns the bitwise logical AND of two arguments

Returns the bitwise logical left shift of two arguments

Returns the bitwise logical NOT of an argument

Returns the bitwise logical OR of two arguments

Returns the bitwise logical right shift of two arguments

Returns the bitwise logical EXCLUSIVE OR of two arguments

Changes one or more substrings that match a pattern

Frees memory allocated by other regular expression (RX) functions and CALL routines

Finds the position, length, and score of a substring that matches a pattern

Finds the beginning of a substring that matches a pattern and returns a value

Parses a pattern and returns a value

Returns one character in the ASCII or the EBCDIC collating sequence

Returns an ASCII or EBCDIC collating sequence character string

Removes multiple blanks from a character string

Removes specific characters from a character string

Removes quotation marks from a character value

Searches a character expression for a string of characters

Searches a character expression for specific characters

Searches a character expression for a specified string as a word

Left aligns a SAS character expression

Returns the length of an argument

Converts all letters in an argument to lowercase

Returns a numeric result that indicates whether the argument contains a missing value

Adds double quotation marks to a character value

Returns the position of a character in the ASCII or EBCDIC collating sequence

Repeats a character expression

Reverses a character expression

Right aligns a character expression

Selects a given word from a character expression

Encodes a string to facilitate searching

Determines the likelihood of two words matching, expressed as the asymmetric spelling
distance between the two words
Replaces character value contents

Extracts a substring from an argument

Replaces specific characters in a character expression

Replaces or removes all occurrences of a word in a character string

Removes trailing blanks from character expressions and returns one blank if the expression
is missing
Removes trailing blanks from character expressions and returns a null string (zero blanks) if
the expression is missing
Converts all letters in an argument to uppercase

Returns the position of the first character that is unique to an expression

Returns the result of a comparison of character strings

Removes specific characters from a character string

Returns the number of double-byte characters in a string

Searches a character expression for a string of characters

Searches a character expression for specific characters

Left aligns a SAS character expression by removing unnecessary leading DBCS blanks and
SO/SI
Returns the length of an argument

Converts all letters in an argument to lowercase

Reverses a character expression

Right aligns a character expression by trimming trailing DBCS blanks and SO/SI

Selects a given word from a character expression

Concatenates two or more character strings

Extracts a substring from an argument

Extracts a substring from an argument based on byte position


Replaces specific characters in a character expression

Removes trailing DBCS blanks and SO/SI from character expressions

Truncates a numeric value to a specified length

Converts all single-byte letters in an argument to uppercase

Inserts, deletes, and replaces character value contents

Inserts, deletes, and replaces character value contents based on byte unit

Returns the position of the first character that is unique to an expression

Returns the number of days between two dates

Returns the current date as a SAS date value

Converts a Julian date to a SAS date value

Extracts the date from a SAS datetime value

Returns the current date and time of day as a SAS datetime value

Returns the day of the month from a SAS date value

Returns a SAS datetime value from date, hour, minute, and second

Returns a SAS time value from hour, minute, and second values

Returns the hour from a SAS time or datetime value

Returns the integer number of time intervals in a given time span

Advances a date, time, or datetime value by a given interval, and returns a date, time, or
datetime value
Returns the Julian date from a SAS date value

Returns a seven-digit Julian date from a SAS date value

Returns a SAS date value from month, day, and year values

Returns the minute from a SAS time or datetime value

Returns the month from a SAS date value

Returns the quarter of the year from a SAS date value

Returns the second from a SAS time or datetime value

Returns the current time of day

Extracts a time value from a SAS datetime value

Returns the current date as a SAS date value

Returns the day of the week from a SAS date value

Returns the year from a SAS date value

Returns the difference in years between two dates

Returns a SAS date value from the year and quarter

Returns the corrected sum of squares

Returns the coefficient of variation

Returns the kurtosis

Returns the largest value

Returns the arithmetic mean (average)

Returns the smallest value

Returns a numeric result that indicates whether the argument contains a missing value

Returns the number of nonmissing values

Returns the number of missing values

Returns any specified order statistic

Returns the range of values

Returns the skewness

Returns the standard deviation

Returns the standard error of the mean

Returns the sum of the nonmissing arguments

Returns the uncorrected sum of squares

Returns the variance

Closes a directory that was opened by the DOPEN function and returns a value

Returns information about a directory

Returns the number of members in a directory

Opens a directory and returns a directory identifier value

Returns directory attribute information

Returns the number of information items that are available for a directory

Returns the name of a directory member

Deletes a note marker from a SAS data set or an external file and returns a value

Appends the current record to the end of an external file and returns a value

Closes an external file, directory, or directory member, and returns a value


Returns the current column position in the File Data Buffer (FDB)

Deletes an external file or an empty directory

Verifies the existence of an external file associated with a fileref and returns a value

Copies data from the File Data Buffer (FDB) into a variable and returns a value

Verifies the existence of an external file by its physical name and returns a value

Assigns or deassigns a fileref for an external file, directory, or output device and returns a
value
Verifies that a fileref has been assigned for the current SAS session and returns a value

Returns the value of a file information item

Identifies the last record that was read and returns a value that FPOINT can use

Opens an external file and returns a file identifier value

Returns the name of an item of information about a file

Returns the number of information items that are available for an external file

Positions the read pointer on the next record to be read and returns a value

Sets the position of the column pointer in the File Data Buffer (FDB) and returns a value

Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB's current
column position, and returns a value
Reads a record from an external file into the File Data Buffer (FDB) and returns a value

Positions the file pointer to the start of the file and returns a value

Returns the size of the last record read, or, if the file is opened for output, returns the current
record size
Sets the token delimiters for the FGET function and returns a value

Writes a record to an external file and returns a value

Opens a file by directory id and member name, and returns the file identifier or a 0

Returns the physical name of a SAS data library or of an external file, or returns a blank

Returns the text of error messages or warning messages from the last data set or external
file function execution
Returns a system error number

Calls the external routine without any return code

Calls the external routine without any return code (in IML environment only)

Calls an external routine and returns a character value

Calls an external routine and returns a character value (in IML environment only)

Calls an external routine and returns a numeric value (in IML environment only)

Calls an external routine and returns a numeric value

Returns compound interest parameters

Returns the convexity for an enumerated cashflow

Returns the convexity for a periodic cashflow stream, such as a bond

Returns the accumulated declining balance depreciation

Returns the accumulated declining balance with conversion to a straight-line depreciation

Returns the accumulated straight-line depreciation

Returns the accumulated sum-of-years-digits depreciation

Returns the accumulated depreciation from specified tables

Returns the declining balance depreciation

Returns the declining balance with conversion to a straight-line depreciation

Returns the straight-line depreciation

Returns the sum-of-years-digits depreciation

Returns the depreciation from specified tables

Returns the modified duration for an enumerated cashflow

Returns the modified duration for a periodic cashflow stream, such as a bond

Returns the internal rate of return as a fraction

Returns the internal rate of return as a percentage

Returns amortization parameters

Returns the net present value as a fraction

Returns the net present value with the rate expressed as a percentage

Returns the present value for a periodic cashflow stream, such as a bond

Returns the future value of a periodic saving

Returns the yield-to-maturity for a periodic cashflow stream, such as a bond

Returns the hyperbolic cosine

Returns the hyperbolic sine

Returns the hyperbolic tangent

Resolves an argument and issues the resolved value for execution

Assigns DATA step information to a macro variable


Returns the resolved value of an argument after it has been processed by the macro facility

Returns the value of a macro variable during DATA step execution

Returns the absolute value

Returns the value of the airy function

Returns the noncentrality parameter from a chi-squared distribution

Computes the number of combinations of n elements taken r at a time and returns a value

Computes some machine and mathematical constants and returns a value

Returns the derivative of the airy function

Computes the deviance and returns a value

Returns the value of the DIGAMMA function

Returns the value of the (normal) error function

Returns the value of the complementary (normal) error function

Returns the value of the exponential function

Computes a factorial and returns a value

Returns the value of the noncentrality parameter of an F distribution

Returns the value of the Gamma function

Returns the value of the modified bessel function

Returns the value of the bessel function

Returns the natural logarithm of the Gamma function

Returns the natural (base e) logarithm

Returns the logarithm to the base 10

Returns the logarithm to the base 2

Returns the remainder value

Computes the number of permutations of n items taken r at a time and returns a value

Returns the sign of a value

Returns the square root of a value

Returns the value of the noncentrality parameter from the student's t distribution

Returns the value of the TRIGAMMA function

Computes cumulative distribution functions

Computes the logarithm of a probability (mass) function

Computes the logarithm of a survival function

Computes probability density (mass) functions

Returns the probability from a Poisson distribution

Returns the probability from a beta distribution

Returns the probability from a binomial distribution

Computes a probability from the bivariate normal distribution and returns a value

Returns the probability from a chi-squared distribution

Returns the probability from an F distribution

Returns the probability from a gamma distribution

Returns the probability from a hypergeometric distribution

Computes a probability or a quantile from various distributions for multiple comparisons of


means, and returns a value
Returns the probability from a negative binomial distribution

Returns the probability from the standard normal distribution

Returns the probability from a t distribution

Computes a survival function

Returns a quantile from the beta distribution

Returns a quantile from the chi-squared distribution

Returns a quantile from the F distribution

Returns a quantile from the gamma distribution

Returns a quantile from the standard normal distribution

Returns a quantile from the t distribution

Returns a random variate from a binomial distribution

Returns a random variate from a Cauchy distribution

Returns a random variate from an exponential distribution

Returns a random variate from a gamma distribution

Returns a random variate from a normal distribution

Returns a random variate from a Poisson distribution

Returns a random variate from a tabled probability distribution


Returns a random variate from a triangular distribution

Returns a random variate from a uniform distribution

Returns a random variate from a normal distribution

Returns a random variate from a binomial distribution

Returns a random variate from a Cauchy distribution

Returns a random variate from an exponential distribution

Returns a random variate from a gamma distribution

Returns a random variate from a normal distribution

Returns a random variate from a Poisson distribution

Returns a random variate from a tabled probability

Random variate from a triangular distribution

Returns a random variate from a uniform distribution

Random variate from a uniform distribution

Returns the value of a character attribute for a SAS data set

Returns the value of a numeric attribute for the specified SAS data set

Verifies the existence of a SAS catalog or SAS catalog entry and returns a value

Closes a SAS data set and returns a value

Returns the observation number of the current observation

Deletes a note marker from a SAS data set or an external file and returns a value

Returns the SAS data set name that is associated with a data set identifier

Verifies the existence of a SAS data library member

Reads the next nondeleted observation from a SAS data set into the Data Set Data Vector
(DDV) and returns a value
Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV) and
returns a value

Returns the value of a SAS data set character variable

Returns the value of a SAS data set numeric variable

Returns a formatted error message for _IORC_

Assigns or deassigns a libref for a SAS data library and returns a value

Verifies that a libref has been assigned and returns a value

Returns an observation ID for the current observation of a SAS data set

Opens a SAS data set and returns a value

Returns the physical name of a SAS data library or of an external file, or returns a blank

Locates an observation identified by the NOTE function and returns a value

Positions the data set pointer at the beginning of a SAS data set and returns a value

Returns the text of error messages or warning messages from the last data set or external
file function execution
Returns a system error number

Returns the format assigned to a SAS data set variable

Returns the informat assigned to a SAS data set variable

Returns the label assigned to a SAS data set variable

Returns the length of a SAS data set variable

Returns the name of a SAS data set variable

Returns the number of a variable's position in a SAS data set

Returns the data type of a SAS data set variable

Returns the memory address of a variable

Writes a value directly into memory

Submits an operating environment command for execution

Returns differences between the argument and its nth lag

Returns the value of a SAS system or graphics option

Returns the value produced when a SAS expression that uses a specified informat
expression is read
Enables you to specify a character informat at run time

Enables you to specify a numeric informat at run time

Returns values from a queue

Stores the contents of a memory address into a numeric variable

Stores the contents of a memory address into a character variable

Writes a value directly into memory

Returns a value using a specified format

Enables you to specify a character format at run time

Enables you to specify a numeric format at run time

Returns the value of the specified operating environment variable


Returns the system parameter string

Determines if a product is licensed

Issues an operating environment command during a SAS session

Converts FIPS codes to uppercase state names

Converts FIPS codes to mixed case state names

Converts FIPS codes to two-character postal codes

Converts state postal codes to FIPS state codes

Converts state postal codes to uppercase state names

Converts state postal codes to mixed case state names

Converts ZIP codes to FIPS state codes

Converts ZIP codes to uppercase state names

Converts ZIP codes to mixed case state names

Converts ZIP codes to state postal codes

Returns the arccosine

Returns the arcsine

Returns the arctangent

Returns the cosine

Returns the sine

Returns the tangent

Returns the smallest integer that is greater than or equal to the argument

Returns the largest integer that is less than or equal to the argument

Returns the nearest integer if the argument is within 1E-12

Returns the integer value

Rounds to the nearest round-off unit

Truncates a numeric value to a specified length

Assigns a variable label to a specified character variable

Links SAS data set variables to DATA step or macro variables that have the same name and
data type
Assigns a variable name as the value of a specified variable

Returns a value that indicates whether the specified name is an array

Returns a value that indicates whether the value of the specified argument is an array

Returns the format that is associated with the specified variable

Returns the format decimal value that is associated with the specified variable

Returns the format decimal value that is associated with the value of the specified argument

Returns the format name that is associated with the specified variable

Returns the format name that is associated with the value of the specified argument

Returns the format width that is associated with the specified variable

Returns the format width that is associated with the value of the specified argument

Returns the format that is associated with the value of the specified argument

Returns a value that indicates whether the specified variable is a member of an array

Returns a value that indicates whether the value of the specified argument is a member of
an array
Returns the informat that is associated with the specified variable

Returns the informat decimal value that is associated with the specified variable

Returns the informat decimal value that is associated with the value of the specified
argument
Returns the informat name that is associated with the specified variable

Returns the informat name that is associated with the value of the specified argument

Returns the informat width that is associated with the specified variable

Returns the informat width that is associated with the value of the specified argument

Returns the informat that is associated with the value of the specified argument

Returns the label that is associated with the specified variable

Returns the variable label for the value of a specified argument

Returns the compile-time (allocated) size of the specified variable

Returns the compile-time (allocated) size for the value of the specified argument

Returns the name of the specified variable

Validates the value of the specified argument as a variable name

Returns the type (character or numeric) of the specified variable

Returns the type (character or numeric) for the value of the specified argument

Decodes a string containing HTML numeric character references or HTML character entity
references and returns the decoded string
Encodes characters using HTML character entity references and returns the encoded string

Returns a string that was decoded using the URL escape syntax
Returns a string that was encoded using the URL escape syntax
Categories and Descriptions of Informats

Category Informat Description


Character $ASCIIw. Converts ASCII character data to native format

$BINARYw. Converts binary data to character data

$CHARw. Reads character data with blanks

$CHARZBw. Converts binary 0s to blanks

$EBCDICw. Converts EBCDIC character data to native format

$HEXw. Converts hexadecimal data to character data

$OCTALw. Converts octal data to character data

$PHEXw. Converts packed hexadecimal data to character data

$QUOTEw. Removes matching quotation marks from character data

$REVERJw. Reads character data from right to left and preserves blanks

$REVERSw. Reads character data from right to left and left aligns

$UPCASEw. Converts character data to uppercase

$VARYINGw. Reads character data of varying length

$w. Reads standard character data

Column Binary $CBw. Reads standard character data from column-binary files

CBw.d Reads standard numeric values from column-binary files

PUNCH.d Reads whether a row of column-binary data is punched

ROWw.d Reads a column-binary field down a card column

DBCS $KANJIw. Removes shift code data from DBCS data

$KANJIXw. Adds shift code data to DBCS data

Date and Time DATEw. Reads date values in the form ddmmmyy or ddmmmyyyy

DATETIMEw. Reads datetime values in the form ddmmmyy hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss

DDMMYYw. Reads date values in the form ddmmyy or ddmmyyyy

EURDFDEw. Reads international date values

EURDFDTw. Reads international datetime values in the form ddmmmyy hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss

EURDFMYw. Reads month and year date values in the form mmmyy or mmmyyyy

JDATEYMDw. Reads Japanese kanji date values in the format yymmmdd or yyyymmmdd

JNENGOw. Reads Japanese Kanji date values in the form yymmdd

JULIANw. Reads Julian dates in the form yyddd or yyyyddd

MINGUOw. Reads dates in Taiwanese form

MMDDYYw. Reads date values in the form mmddyy or mmddyyyy

MONYYw. Reads month and year date values in the form mmmyy or mmmyyyy

MSECw. Reads TIME MIC values

NENGOw. Reads Japanese date values in the form eyymmdd

PDJULGw. Reads packed Julian date values in the hexadecimal form yyyydddF for IBM

PDJULIw. Reads packed Julian dates in the hexadecimal format ccyyddd F for IBM

PDTIMEw. Reads packed decimal time of SMF and RMF records

RMFDURw. Reads duration intervals of RMF records

RMFSTAMPw. Reads time and date fields of RMF records

SHRSTAMPw. Reads date and time values of SHR records

SMFSTAMPw. Reads time and date values of SMF records

TIMEw. Reads hours, minutes, and seconds in the form hh:mm:ss.ss

TODSTAMPw. Reads an eight-byte time-of-day stamp

TUw. Reads timer units

YYMMDDw. Reads date values in the form yymmdd or yyyymmdd

YYMMNw. Reads date values in the form yyyymm or yymm

YYQw. Reads quarters of the year

Numeric BINARYw.d Converts positive binary values to integers

BITSw.d Extracts bits

BZw.d Converts blanks to 0s

COMMAw.d Removes embedded characters


COMMAXw.d Removes embedded characters

Ew.d Reads numeric values that are stored in scientific notation and double-precision scientific notation

FLOATw.d Reads a native single-precision, floating-point value and divides it by 10 raised to the dth power

HEXw. Converts hexadecimal positive binary values to either integer (fixed-point) or real (floating-point) binary values

IBw.d Reads native integer binary (fixed-point) values, including negative values

IBRw.d Reads integer binary (fixed-point) values in Intel and DEC formats

IEEEw.d Reads an IEEE floating-point value and divides it by 10 raised to the d th power

NUMXw.d Reads numeric values with a comma in place of the decimal point

OCTALw.d Converts positive octal values to integers

PDw.d Reads data that are stored in IBM packed decimal format

PERCENTw.d Reads percentages as numeric values

PIBw.d Reads positive integer binary (fixed-point) values

PIBRw.d Reads positive integer binary (fixed-point) values in Intel and DEC formats

PKw.d Reads unsigned packed decimal data

RBw.d Reads numeric data that are stored in real binary (floating-point) notation

S370FFw.d Reads EBCDIC numeric data

S370FIBw.d Reads integer binary (fixed-point) values, including negative values, in IBM mainframe format

S370FIBUw.d Reads unsigned integer binary (fixed-point) values in IBM mainframe format

S370FPDw.d Reads packed data in IBM mainframe format

S370FPDUw.d Reads unsigned packed decimal data in IBM mainframe format

S370FPIBw.d Reads positive integer binary (fixed-point) values in IBM mainframe format

S370FRBw.d Reads real binary (floating-point) data in IBM mainframe format

S370FZDw.d Reads zoned decimal data in IBM mainframe format

S370FZDLw.d Reads zoned decimal leading-sign data in IBM mainframe format

S370FZDSw.d Reads zoned decimal separate leading-sign data in IBM mainframe format

S370FZDTw.d Reads zoned decimal separate trailing-sign data in IBM mainframe format

S370FZDUw.d Reads unsigned zoned decimal data in IBM mainframe format

VAXRBw.d Reads real binary (floating-point) data in VMS format

w.d Reads standard numeric data

YENw.d Removes embedded yen signs, commas, and decimal points

ZDw.d Reads zoned decimal data

ZDBw.d Reads zoned decimal data in which zeros have been left blank

ZDVw.d Reads and validates zoned decimal data


Categories and Descriptions of DATA Step Statements

Category Statement Description


Action ABORT Stops executing the current DATA step, SAS job, or SAS session

Assignment Evaluates an expression and stores the result in a variable

CALL Invokes or calls a SAS CALL routine

DELETE Stops processing the current observation

DESCRIBE Retrieves source code from a stored compiled DATA step program or a DATA step view

ERROR Sets _ERROR_ to 1 and, optionally, writes a message to the SAS log

EXECUTE Executes a stored compiled DATA step program

IF, Subsetting Continues processing only those observations that meet the condition

LIST Writes to the SAS log the input data records for the observation that is being processed

LOSTCARD Resynchronizes the input data when SAS encounters a missing or invalid record in data that have multiple records per
observation
Null Signals the end of data lines; acts as a placeholder

OUTPUT Writes the current observation to a SAS data set

REDIRECT Points to different input or output SAS data sets when you execute a stored program

REMOVE Deletes an observation from a SAS data set

REPLACE Replaces an observation in the same location

STOP Stops execution of the current DATA step

Sum Adds the result of an expression to an accumulator variable

WHERE Selects observations from SAS data sets that meet a particular condition

Control CONTINUE Stops processing the current DO-loop iteration and resumes with the next iteration

DO Designates a group of statements to be executed as a unit

DO, Iterative Executes statements between DO and END repetitively based on the value of an index variable

DO UNTIL Executes statements in a DO loop repetitively until a condition is true

DO WHILE Executes statements repetitively while a condition is true

END Ends a DO group or a SELECT group

GO TO Moves execution immediately to the statement label that is specified

IF-THEN/ELSE Executes a SAS statement for observations that meet specific conditions

Labels, Statement Identifies a statement that is referred to by another statement

LEAVE Stops processing the current loop and resumes with the next statement in sequence

LINK Jumps to a statement label

RETURN Stops executing statements at the current point in the DATA step and returns to a predetermined point in the step

SELECT Executes one of several statements or groups of statements

File-handling BY Controls the operation of a SET, MERGE, MODIFY, or UPDATE statement in the DATA step and sets up special grouping
variables
CARDS Indicates that data lines follow

CARDS4 Indicates that data lines that contain semicolons follow

DATA Begins a DATA step and provides names for any output SAS data sets

DATALINES Indicates that data lines follow

DATALINES4 Indicates that data lines that contain semicolons follow

FILE Specifies the current output file for PUT statements

FILE, ODS Defines the structure of the data component that holds the results of the DATA step and binds that component to a template
to produce an output object. ODS sends this object to all open ODS destinations, each of which formats the object
INFILE appropriately. Also controls
Identifies an external whatwith
file to read happens whenstatement
an INPUT the PUT statement tries to write past the end of a line.

INPUT Describes the arrangement of values in the input data record and assigns input values to the corresponding SAS variables

INPUT, Column Reads input values from specified columns and assigns them to the corresponding SAS variables

INPUT, Formatted Reads input values with specified informats and assigns them to the corresponding SAS variables

INPUT, List Scans the input data record for input values and assigns them to the corresponding SAS variables

INPUT, Named Reads data values that appear after a variable name that is followed by an equal sign and assigns them to corresponding
SAS variables
MERGE Joins observations from two or more SAS data sets into single observations

MODIFY Replaces, deletes, and appends observations in an existing SAS data set in place; does not create an additional copy

PUT Writes lines to the SAS log, to the SAS procedure output file, or to an external file that is specified in the most recent FILE
statement
PUT, Column Writes variable values in the specified columns in the output line

PUT, Formatted Writes variable values with the specified format in the output line

PUT, List Writes variable values and the specified character strings in the output line
PUT, Named Writes variable values after the variable name and an equal sign

PUT, _ODS_ Writes data values to a special buffer from which they can be written to the data component, and formatted by ODS
destinations
SET Reads an observation from one or more SAS data sets

UPDATE Updates a master file by applying transactions

Information ARRAY Defines elements of an array

Array Reference Describes the elements in an array to be processed

ATTRIB Associates a format, informat, label, and/or length with one or more variables

DROP Excludes variables from output SAS data sets

FORMAT Associates formats with variables

INFORMAT Associates informats with variables

KEEP Includes variables in output SAS data sets

LABEL Assigns descriptive labels to variables

LENGTH Specifies the number of bytes for storing variables

MISSING Assigns characters in your input data to represent special missing values for numeric data

RENAME Specifies new names for variables in output SAS data sets

RETAIN 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
Categories and Descriptions of Global Statements

Category Statement Description


Data Access CATNAME 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 Associates a SAS fileref with an external file or an output device; disassociates a fileref and external file; lists attributes of
external files
FILENAME, CATALOG Access Method
References a SAS catalog as an external file

FILENAME, FTP Access Method Allows you to access remote files using the FTP protocol

FILENAME, SOCKET Access Method


Allows you to read from or write to a TCP/IP socket

FILENAME, URL Access Method Allows you to access remote files using the URL access method

LIBNAME Associates or disassociates a SAS data library with a libref (a shortcut name); clears one or all librefs; lists the
characteristics of a SAS data library; concatenates SAS data libraries; implicitly concatenates SAS catalogs.
LIBNAME, SAS/ACCESS Associates a SAS libref with a database management system (DBMS) database, schema, server, or group of tables or
views
Log Control Comment Documents the purpose of the statement or program

PAGE Skips to a new page in the SAS log

SKIP Creates a blank line in the SAS log

Operating X Issues an operating-environment command from within a SAS session


Environment
Output Control FOOTNOTE Prints up to ten lines of text at the bottom of the procedure or DATA step output

ODS EXCLUDE Specifies output objects to exclude from ODS destinations

ODS HTML Opens, manages, or closes the HTML destination. If the destination is open, you can create HTML output (output that is
written in Hypertext Markup Language).
ODS LISTING Opens, manages, or closes the Listing destination

ODS OUTPUT Creates a SAS data set from an output object and manages the selection and exclusion lists for the Output destination

ODS PATH Specifies which locations to search for definitions that were created by PROC EMPLATE, as well as the order in which to
search for them
ODS PRINTER Opens, manages, or closes the Printer destination. If the destination is open, you can create Printer output (output that is
formatted for a high-resolution printer)
ODS SELECT Specifies output objects for ODS destinations

ODS SHOW Writes to the SAS log the specified selection or exclusion list

ODS TRACE Writes to the SAS log a record of each output object that is created, or suppresses the writing of this record

ODS VERIFY Prints or suppresses a warning that a style definition or a table definition that is used is not supplied by SAS Institute

TITLE Specifies title lines for SAS output

Program Control DM Submits SAS Program Editor, Log, Procedure Output or text editor commands as SAS statements

ENDSAS Terminates a SAS job or session after the current DATA or PROC step executes

%INCLUDE Brings a SAS programming statement, data lines, or both, into a current SAS program

%LIST Displays lines that are entered in the current session

OPTIONS Changes the value of one or more SAS system options

RUN Executes the previously entered SAS statements

%RUN Ends source statements following a %INCLUDE * statement

Window Display DISPLAY Displays a window that is created with the WINDOW statement

WINDOW Creates customized windows for your applications


Report-Writing Procedures by Task
To Produce Use this Procedure Which
Details Reports PRINT produces data listings quickly; can supply titles, footnotes, and
column sums.
REPORT offers more control and customization than PROC PRINT; can
produce both column and row sums; has DATA step computation
abilities.
SQL combines Structured Query Language and SAS features such as
formats; can manipulate data and create a SAS data set in the same
step that creates the report; can produce column and row statistics;
Summary Reports PRINT produces only as
does not offer onemuch
summary
controlreport: can sum
over output asthe BY variables.
PROC PRINT and
PROC REPORT.
REPORT combines features of the PRINT, MEANS, and TABULATE
procedures with features of the DATA step in a single report writing
tool that can produce a variety of reports; can also create an output
TABULATE displays
data set. descriptive statistics in tabular form. The value in each
table cell is calculated from the variables and statistics that define
the pages, rows, and columns of the table. The statistic associated
with each cell is calculated on values from all observations in that
category. You can output the results to a SAS data set.

SQL computes descriptive statistics for one or more SAS data sets or
DBMS tables; can produce a printed report or create a SAS data
set.
MEANS or SUMMARY computes descriptive statistics for numeric variables; can produce a
printed report and create an output data set.
Miscellaneoous bhighy formatted reports

Calendars CALENDER displays data from a SAS data set in a monthly calendar format.
PROC CALENDAR can display holidays in the month, schedule
tasks, and process data for multiple calendars with work schedules
that vary.

Labels, Forms FORMS produces labels for envelopes, mailing labels, external tape labels,
file cards, and other printer forms that have a regular pattern.

Name/address listings FORMS produces multicolumn name and address listings.

Multipanel reports REPORT produces multipanel reports.


(telephone book listing)

Low-resolution graphical reports

CHART produces vertical and horizontal bar charts (also called histograms),
block charts, pie charts, and star charts. These charts provide a
quick visual representation of the values of a single variable or
several variables. PROC CHART can also display a statistic
associated with the values.

PLOT produces scatter diagrams that plot one variable against another.

TIMEPLOT produces plots of one or more variables over time intervals.


Elementary Statistical Procedures by Task

Descriptive Statistics CORR computes Pearson product-moment and weighted product-moment


correlation coefficients between variables and descriptive statistics
for these variables. In addition, PROC CORR can compute three
nonparametric measures of association (Spearman's rank-order
correlation, Kendall's tau-b, and Hoeffding's measure of
dependence, D), partial correlations (Pearson's partial correlation,
Spearman's partial rank-order correlation, and Kendall's partial tau-
b), and Cronbach's coefficient alpha.

MEANS or SUMMARY computes descriptive statistics for numeric variables across all
observations and within groups of observations. You can also create
an output data set that contains specific statistics and identifies
minimum and maximum values for groups of observations.

REPORT computes most of the same statistics as PROC TABULATE; allows


customization of format.

SQL computes descriptive statistics for data in one or more DBMS tables;
can produce a printed report or create a SAS data set.
TABULATE produces tabular reports for descriptive statistics; can create an
output data set.
UNIVARIATE computes the broadest set of descriptive statistics; can create an
output data set.

Frequecy and cross- FREQ produces one-way to n-way tables; reports frequency counts;
tabulation tables computes chi-square tests; computes tests and measures of
association and agreement for two-way to n-way cross-tabulation
tables; can compute exact tests and asymptotic tests; can create
output data sets.

TABULATE produces one-way and two-way cross-tabulation tables; can create


an output data set.

UNIVARIATE produces one-way frequency tables.

Correlation analysis CORR computes Pearson's, Spearman's, and Kendall's correlations and
partial correlations; also computes Hoeffding's D and Cronbach's
coefficient alpha.
Distribution analysis UNIVARIATE computes tests for location and tests for normality.

FREQ computes a test for the binomial proportion for one-way tables;
computes a goodness-of-fit test for one-way tables; computes a chi-
square test of equal distribution for two-way tables.
Robust estimation UNIVARIATE computes robust estimates of scale, trimmed means, and
Winsorized means.
Data transformation

Computing ranks RANK computes ranks for one or more numeric variables across the
observations of a SAS data set and creates an output data set; can
produce normal scores or other rank scores.
Standardizing data STANDARD creates an output data set that contains variables that are
standardized to a given mean and standard deviation.
Low-resolution graphical reports
CHART produces a graphical report that can show one of the following
statistics for the chart variable: frequency counts, percentages,
cumulative frequencies, cumulative percentages, totals, or
UNIVARIATE produces
averages.descriptive plots such as stem and leaf, box plot, and
normal probability plot.

Utility Procedures by Task

Supply information COMPARE compares the contents of two SAS data sets. You can also use
PROC COMPARE to compare the values of different variables
within a single data set. PROC COMPARE produces a variety of
reports on the comparisons that it performs.

CONTENTS prints descriptions of the contents of one or more files in a SAS data
library.

OPTIONS lists the current values of all SAS system options.

SQL supplies information through dictionary tables on an individual SAS


data set as well as all SAS files active in the current SAS session.
Dictionary tables can also provide information about macros, titles,
Affect printing EXPLODE produces oversized
indexes, external textoron
files, printed
SAS output;
system can produce displays
options.
such as posters, flip charts, and header pages.

FORMAT creates user-defined formats to display and print data.

PTINTTO routes procedure output to a file, a SAS catalog entry, or a printer;


can also redirect the SAS log to a file.
Create, browse, and edit FLIST browses external files such as files that contain SAS source lines or
data SAS procedure output.
SQL creates SAS data sets using Structured Query Language and SAS
features.

Transform data FORMAT creates user-defined informats and formats for character or numeric
variables. PROC FORMAT also prints the contents of a format
library, creates a control data set to write other informats or formats,
and reads a control data set to create informats or formats.

SORT sorts SAS data sets by one or more variables.

SQL sorts SAS data sets by one or more variables.

TRANSPOSE transforms SAS data sets so that observations become variables


and variables become observations.

TRANTAB creates, edits, and displays customized translation tables.

Manage SAS files APPEND adds observations from one SAS data set to the end of another SAS
data set
BMDP invokes a BMDP program to analyze data in a SAS data set.

CATALOG manages SAS catalog entries.

CIMPORT restores a transport file created by the CPORT procedure to its


original form (a SAS data library, catalog, or data set) in the format
appropriate to the operating environment. Coupled with the CPORT
procedure, PROC CIMPORT enables you to move SAS data
libraries, catalogs, and data sets from one operating environment to
another.

CONVERT converts BMDP system files, OSIRIS system files, and SPSS
portable files to SAS data sets.
COPY copies an entire SAS data library or specific members of the library.
You can limit processing to specific types of library members.

CPORT converts a SAS catalog, a SAS data set, or a SAS library to a


transport sequential file that PROC CIMPORT can restore (usually
under another operating environment) to its original form.
DATASETS lists, copies, renames, and deletes SAS files and SAS generation
groups, manages indexes, and appends SAS data sets in a SAS
data library. The procedure provides all the capabilities of the
APPEND, CONTENTS, and COPY procedures. You can also modify
variables within data sets, manage data set attributes, such as
labels and passwords, or create and delete integrity constraints.

EXPORT reads data from a SAS data set and writes them to an external data
source.
IMPORT reads data from an external data source and writes them to a SAS
data set.

PDS lists, deletes, and renames the members of a partitioned data set.

PDSCOPY copies partitioned data sets from disk to tape, disk to disk, tape to
tape, or tape to disk.
REGISTRY imports registry information to the USER portion of the SAS
Registry.

RELEASE releases unused space at the end of a disk data set under the
OS/390 environment.
SOURCE provides an easy way to back up and process source library data
sets.
SQL concatenates SAS data sets.

TAPECOPY copies an entire tape volume or files from one or more tape volumes
to one output tape volume.
TAPELABEL lists the label information of an IBM standard-labeled tape volume
under the OS/390 environment.
PMENU creates customized pull-down menus for SAS applications.
by Task
Example

PROC CHART DATA=SASdataset options;


VBAR variable / options;
HBAR variable / options;
options: MIDPOINTS= GROUP= SUMVAR=

PROC PLOT DATA=SASdataset options;


options: HPERCENT= VPERCENT=
PLOT yvariable *
xvariable = symbol / options;
PLOT (yvariables) *
(xvariables) = symbol / options ;
PLOT options: BOX OVERLAY VREF= HREF=
BY variable(s) ;
res by Task

PROC MEANS DATA=SASdataset options;


options:N MEAN STD MIN MAX SUM VAR CSS USS
VAR variable(s);
BY variable(s);
OUTPUT OUT=SASdataset keyword=variablename ... ;

PROC UNIVARIATE DATA=SASdataset options;


options:PLOT
VAR variable(s);
BY variable(s);
OUTPUT OUT=SASdataset keyword=variablename ... ;

PROC FREQ DATA=SASdataset;


TABLES variable(s) / options;
options:NOCOL NOROW NOPERCENT
OUTPUT OUT=SASdataset;
ask
Categories and Descriptions of SAS System Options

Category Statement Description


Communications: CONNECTREMOTE= Specifies the remote session ID that is used for SAS/CONNECT software
Networking and
encryption
CONNECTSTATUS Specifies whether or not to display the SAS/CONNECT transfer status window

CONNECTWAIT Specifies whether or not to wait for a SAS/CONNECT remote submit statement (rsubmit) to complete
before control returns to the local session
NETENCRYPT Encrypts all network communications

NETENCRYPTALGORITHM= Specifies the algorithm(s) available for the encryption of data that are passed over the network

NETENCRYPTKEYLEN= Specifies the key size to use for the encryption of data that are passed over the network

NETMAC Controls whether SAS uses Message Authentication Codes (MACs) to detect message corruption
across a network
SASCMD Used by the SIGNON portion of SAS/CONNECT to invoke a remote or server SAS session

SASFRSCR Contains the fileref that is generated by the SASSCRIPT system option

SASSCRIPT= Specifies one or more storage locations of SAS/CONNECT script files

TBUFSIZE= Specifies the buffer size to use when you transmit data with SAS/CONNECT or SAS/SHARE
software

TCPPORTFIRST= Specifies the first TCP/IP port for SAS/CONNECT software

TCPPORTLAST= Specifies the last TCP/IP port for SAS/CONNECT software

Environment control: CHARCODE Determines whether character comb inations are substituted for special characters that are not on the
Display keyboard

FORMS= Specifies the default form that is used for windowing output

SOLUTIONS Specifies whether the SOLUTIONS menu choice appears in all SAS windows and whether the
SOLUTIONS folder appears in the SAS Explorer window
Environment control: BYERR Controls whether SAS generates an error message and sets the error fl ag when a _NULL_ data set
Error handling is used in the SORT procedure

CLEANUP Specifies how to handle an out-of-resource condition

DSNFERR Controls how SAS responds when a SAS data set is not found

ERRORABEND Specifies how SAS responds to errors

ERRORCHECK= Controls error handling in batch processing

ERRORS= Controls the maximum number of observations for which complete error messages are printed

FMTERR Determines whether or not SAS generates an error message when a format of a variable cannot be
found
VNFERR Controls how SAS responds when a _NULL_ data set is used

Environment control: APPLETLOC= Specifies the location of Java applets


Files
DOCLOC= Specifies the base location of SAS online documentation

FMTSEARCH= Controls the order in which format catalogs are searched

HELPLOC= Specifies the location of the text and index files for the facility that is used to view SAS help

NEWS= Specifies a file that contains messages to be written to the SAS log

PARM= Specifies a parameter string that is passed to an external program

PARMCARDS= Specifies the file reference to use as the PARMCARDS file

REP_MGRLOC= Specifies the location of the repository manager for common metadata

RSASUSER Controls access to the SASUSER library

SASAUTOS= Specifies the autocall macro library

SASHELP= Specifies the location of the SASHELP library

SASUSER= Specifies the name of the SASUSER library

SYSPARM= Specifies a character string that can be passed to SAS programs

TRAINLOC= Specifies the base location of SAS online training courses

USER= Specifies the default permanent SAS data library

WORK= Specifies the WORK data library

WORKINIT Initializes the WORK data library


WORKTERM Controls whether SAS erases WORK files at the termination of a SAS session

Environment control: BATCH Specifies whether batch settings for LINESIZE, OVP, PAGESIZE, and SOURCE are in effect when
Initialization and SAS executes
operation
DMR Controls the ability to invoke a remote SAS session so that you can run SAS/CONNECT software

DMS Invokes the SAS windowing environment

DMSEXP Invokes SAS with the Explorer, program editor, log, output, and results windows

EXPLORER Controls whether or not you invoke SAS with only the Explorer window

INITCMD Suppresses the Log, Output, and Program Editor windows when you enter a SAS/AF application

INITSTMT= Specifies a SAS statement to be executed after any statements in the autoexec file and before any
statements from the SYSIN= file
MULTENVAPPL Controls whether SAS/AF, SAS/FSP, and base windowing applications use a default on an operating
environment specific font selector window

Environment control: OBJECTSERVER Specifies whether or not to put the SAS session into DCOM/CORBA server mode
Initialization and
operation
TERMINAL Determines whether SAS evaluates the execution mode and, if needed, resets the option

Environment control: DFLANG= Specifies language for international date informats and formats
Language control

TRANTAB= Specifies the translation tables that are used by various parts of SAS

Files: External files STARTLIB Allows previous library references (librefs) to persist in a new SAS session

SYNCHIO Specifies whether synchronous I/O is enabled

Files: SAS files ASYNCHIO Specifies whether asynchronous I/O is enabled

BUFNO= Specifies the number of buffers to use for SAS data sets

BUFSIZE= Specifies the permanent buffer size for output SAS data sets

CATCACHE= Specifies the number of SAS catalogs to keep open

CBUFNO= Controls the number of extra page buffers to allocate for each open SAS catalog

COMPRESS= Controls the compression of observations in output SAS data sets

DATASTMTCHK= Prevents certain errors by controlling the SAS keywords that are allowed in the DATA statement

DKRICOND= Controls the level of error d etection for input data sets during processi ng of DROP=, KEEP=, and
RENAME= data set options
DKROCOND= Controls the level of error d etection for output data sets during the processing of DROP=, KEEP=,
and RENAME= data set options and the corresponding DATA step stat ements
DLDMGACTION= Specifies what type of action to take when a SAS catalog or a SAS data set in a SAS data library is
detected as damaged

ENGINE= Specifies the default access method for SAS data libraries

FIRSTOBS= Causes SAS to begin reading at a specified observation or record

_LAST_= Specifies the most recently created data set

MERGENOBY Controls whether a message is issued when MERGE processing occurs without an associated BY
statement
OBS= Specifies which observation SAS processes last

REPLACE Controls whether you can replace permanently stored SAS data sets

REUSE= Specifies whether or not SAS reuses space when observations are added to a compressed SAS
data set
VALIDVARNAME= Controls the type of SAS variable names that can be created and processed during a SAS session

Graphics: Driver DEVICE= Specifies a terminal device driver for SAS/GRAPH software
settings
GISMAPS= Specifies the location of the SAS data library that contains SAS/GIS-supplied US Census Tract maps

GWINDOW Controls whether SAS displays SAS/GRAPH output in the GRAPH window of the windowing
environment
MAPS= Specifies the list of locations to search for maps

Input control: Data CARDIMAGE Processes SAS source and data lines as 80-byte cards
processing

INVALIDDATA= Specifies the value SAS is to assign to a variable when invalid numeric data are encountered

PROC Enables a PROC statement to invoke external programs

S= Specifies the length of statements on each line of a source statement and the length of data on lines
that follow a DATALINES statement

S2= Specifies the length of secondary source statements

SEQ= Specifies the length of the numeric portion of the sequence field in input source lines or datalines
SPOOL Controls whether SAS writes SAS statements to a utility data set in the WORK data library

Input control: Data CAPS Indicates whether to translate input to uppercase


processing
YEARCUTOFF= Specifies the first year of a 100-year span that will be used by date informats and functions to read a
two-digit year

Log and procedure FORMDLIM= Specifies a character to delimit page breaks in SAS output
output control:
Procedure output
PRINTINIT Initializes the SAS print file

Log and procedure OVP Overprints output lines


output control: SAS
log
SOURCE Controls whether SAS writes source statements to the SAS log

SOURCE2 Writes secondary source statements from included files to the SAS log

Log and procedure BINDING= Specifies the binding edge for the ODS printer destination
output control: ODS
printing
BOTTOMMARGIN= Specifies the size of the margin at the bottom of the page for the ODS printer destination

COLLATE Specifies the collation of multiple copies for output for the ODS printer destination

COLORPRINTING Specifies color printing, if it is supported, for the ODS printer destination

COPIES= Specifies the number of copies to make when printing to the ODS printer destination

DUPLEX Specifies duplexing controls for the ODS printer destination

LEFTMARGIN= Specifies the size of the margin on the left side of the page for the ODS printer destination

ORIENTATION= Specifies the paper orientation to use when printing to the ODS printer destination

PRINTERPATH= Specifies a printer for SAS print jobs directed to the ODS printer destination

Log and procedure BYLINE Controls whether BY lines are printed above each BY group
output control:
Procedure output
CENTER Controls alignment of SAS procedure output

FORMCHAR= Specifies the default output formatting characters

LABEL Determines whether SAS procedures can use labels with variables

PAGENO= Resets the page number

PROBSIG= Specifies the number of significant digits in p-values for some statistical procedures

SKIP= Specifies the number of lines to skip at the top of each page of SAS output

Log and procedure CONSOLELOG= Specifies the location of the console log
output control: SAS
log
CPUID Specifies whether hardware information is written to the SAS log

Log and procedure NUMBER Controls the printing of page numbers


output control: SAS
log and procedure
Log and procedure DATE
output Prints the date and time that the SAS session was initialized
output control: SAS
log and procedure
output DETAILS Specifies whether to include additional information when files are listed in a SAS data library

LINESIZE= Specifies the line size of SAS procedure output

MISSING= Specifies the character to print for missing numeric values

PAGESIZE= Specifies the number of lines that compose a page of SAS output

Log and procedure ECHOAUTO Controls whether autoexec code in an input file is echoed to the log
output control: SAS
log
MSGLEVEL= Controls the level of detail in messages that are written to the SAS log

NOTES Writes notes to the SAS log

Macro: SAS macro CMDMAC Determines whether the macro processor recognizes a command-style macro invocation

IMPLMAC Controls whether SAS allows statement-style macro calls

MACRO Specifies whether the SAS macro language is available

MAUTOSOURCE Determines whether the macro autocall feature is available

MERROR Controls whether SAS issues a warning message when a macro-like name does not match a macro
keyword
MFILE Specifies whether MPRINT output is directed to an external file

MLOGIC Controls whether SAS traces execution of the macro language processor

MPRINT Displays SAS statements that are generated by macro execution


MRECALL Controls whether SAS searches the autocall libraries for a file that was not found during an earlier
search
MSTORED Determines whether the macro facility searches a specific catalog for a stored, compiled macro

MSYMTABMAX= Specifies the maximum amount of memory that is available to macro variable symbol tables

MVARSIZE= Specifies the maximum size for macro variables that are stored in memory

SASMSTORE= Specifies the libref of a SAS data library that contains a catalog of stored, compiled SAS macros

SERROR Controls whether SAS issues a warning message when a defined macro variable reference does not
match a macro variable

SYMBOLGEN Controls whether the results of resolving macro variable references are written to the SAS log

SAS log and PAPERDEST= Specifies the bin to receive printed output for the ODS printer destination
procedure output
control: ODS printing
PAPERSIZE= Specifies the paper size to use when printing to the ODS printer destination

PAPERSOURCE= Specifies the paper bin to use for printing to the ODS printer destination

PAPERTYPE= Specifies the type of paper to use for printing to the ODS printer destination

RIGHTMARGIN= Specifies the size of the margin at the right side of the page for printed output directed to the ODS
printer destination

TOPMARGIN= Specifies the size of the margin at the top of the page for the ODS printer destination

SAS log and PRINTMSGLIST Controls the printing of extended lists of messages to the SAS log
procedure output:
SAS log
Sort: Procedure SORTDUP= Controls the SORT procedure's application of the NODUP option to physical or logical records
options
SORTSEQ= Specifies which collating sequence the SORT procedure is to use

SORTSIZE= Specifies the amount of memory that is available to the SORT procedure

System SETINIT Controls whether site license information can be altered


administration:
Installation
System SUMSIZE= Specifies a limit on the amount of memory that is a vailable for data summarization procedures when
administration: class variables are active
Memory
System CMPOPT Controls whether SAS language compiler optimization is in effect
administration:
Performance

You might also like