Note: For the CHANGE statement in PROC DATASETS, specifying GENNUM=0
refers to the entire generation group.
Using Passwords in a Generation Group
Passwords for versions in a generation group are maintained as follows:
If you assign a password to the base version, the password is maintained in
subsequent historical versions. However, the password is not applied to any existing
historical versions.
If you assign a password to a historical version, the password applies to that
individual data set only.
Understanding Integrity Constraints
Definition of Integrity Constraints
Integrity constraints are a set of data validation rules that you can specify in order to
restrict the data values that can be stored for a variable in a SAS data file. Integrity
constraints help you preserve the validity and consistency of your data. SAS enforces the
integrity constraints when the values associated with a variable are added, updated, or
deleted.
There are two categories of integrity constraints: general and referential.
CAUTION:
Do not use operating system tools when managing integrity constraints. This
can cause your data set to become damaged. Instead, use SAS tools such as the
DATASETS procedure or the SQL procedure.
General and Referential Integrity Constraints
General Integrity Constraints
General integrity constraints enable you to restrict the values of variables within a single
file. There are four types of general constraints:
check
limits the data values of variables to a specific set, range, or list of values. Check
constraints can also be used to ensure that the data values in one variable within an
observation are contingent on the data values of another variable in the same
observation.
not null
requires that a variable contain a data value. Null (missing) values are not allowed.
unique
requires that the specified variable or variables contain unique data values. A null
data value is allowed but is limited to a single instance.
primary key
requires that the specified variable or variables contain unique data values and that
null data values are not allowed. Only one primary key can exist in a data file.
Understanding Integrity Constraints 637

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.