Please enable JavaScript.
Coggle requires JavaScript to display documents.
SAS BASE Chapter 3: Examining SAS Data Sets (SAS Libraries (LIBNAME libref…
SAS BASE Chapter 3: Examining SAS Data Sets
SAS Data Set
SAS Data Set = Table
Descriptor
General properties
Variable properties
proc contents data= ... ;
run;
Data
Contains data values
Either character or numeric
proc print data = ...;
run;
Variables = Columns
Observation = Row
SAS variable names
1- 32 char long
start with letter or _
Subsequent char letters / num / _
not case sensitive
Data Types
Character Variables
1 - 32767 char in length
1 byte per char
can contain any value
Blank rep missing value
Numeric Variables
Store using floating point or binary rep.
8 bytes storage (default)
store 16-17 significant digits
. rep missing value
Date
Stored as numeric
Starts from 1582 AD
YEARCUTOFF=
For 2 year digit year
Specify which 100 year span
SAS Libraries
Dataset stored in libraries
A collection of SAS files referenced and stored as a unit
File can be stored in temp or permanent lib
Type of library
Temporary Lib = WORK
Lasts during session only
Can use one level name
Permanent lib = SAShelp
User defined
created by user
permanent, only deleted by user
not auto available in SAS
In OS filesystem
Accessing: libref.data_set_name
LIBNAME libref "SAS-library" options;
Not required to be in DATA / PROC
No need RUN;
Execute immediately
Persists until changed, canceled or session ends
libname libref clear;
Browsing library
proc contents data=libref.
all
nods;
run;
_ALL_ requests all files and lib
NODS suppresses data set descriptor
NODS can only be used with _ALL_