Search notes:

SAS Programming Language

The SAS program usually is step oriented: it consists of a series of data step or built-in PROC steps.
A step passes data to the next step in a data set.
Macro variables start with an ampersand (&), macro names start with a percent sign (%).
SAS has only two data types: real numbers and fixed length character strings.
Dates are stored as number of days since January 1st, 1960.

Fixed length character data

Character data is fixed length.
On the first occasion for the compiler to determine the length of character data, it assigns this length.
In order to control the length of such character data deterministically, the length statement should be used:
data ds_foo;
  length  bar $ 10 baz 4;

  bar = "…";
  baz =  22;

run;

I/O

Important statements for I/O are:
A buffer can be thought as something that moves data from the PDV to a file or from a file to the PDV.

See also

data step, procedural step
Macro facility
SAS programming: Global statements
informats and formats
SAS: code snippets
functions
call routines
literals
data sets
operators
variable
dictionary tables
Some hopefully useful macros
Character strings and single/double quotes.
syntax check mode
SAS: recovering an interactive session
error handling

Index