Placing Integrity Constraints on a Data Set


Integrity constraints can be created using either the DATASETS procedure or the SQL procedure.
Although you can use either procedure to create integrity constraints on existing data sets, you must use PROC SQL if you want to create integrity constraints at the same time that you create the data set. In this chapter you learn to use PROC DATASETS to place integrity constraints on an existing data set.
General form, DATASETS procedure with the IC CREATE statement:
MODIFY SAS-data-set;
IC CREATE constraint-name=constraint
<MESSAGE='Error Message'>;
Here is an explanation of the syntax:
is the library in which the data set is stored. ...

Get SAS Certification Prep Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.