IDVALIDATION Procedure

Getting Started: IDVALIDATION Procedure

This section illustrates how you can use the IDVALIDATION procedure to validate the uniqueness of each identifier (ID) in an input data table.

The following DATA step creates the mylib.input_table data table. It contains three variables: the name variable contains the textual IDs, and the main_id and sub_id variables contain the numerical IDs. The variables are separated by vertical bars (|).

data mylib.input_table;
   length name $100;
   infile datalines delimiter='|' missover;
   input name$ main_id sub_id;
   datalines;
      Jordon  | 1 | 2
      Thomas  | 1 | 1
      Andrew  | 2 | 2
      Jimmy   | 2 | 1
      Klunder | 3 | 2
      Bert    | 3 | 1
;
run;

The input data must be a table on your CAS server, and a CAS session must be set up. For more information, see the sections Using CAS Sessions and CAS Engine Librefs and Loading a SAS Data Set onto a CAS Server in Chapter 1, Shared Concepts. These statements assume that your CAS libref is named mylib, but you can substitute any appropriately defined CAS libref.

The following statements read the input data set and check for duplicate IDs:

proc idvalidation
data = mylib.input_table;
id main_id;
run;

Figure 1 shows the SAS log that PROC IDVALIDATION generates. The log provides information about the default configurations that the procedure uses.

Figure 1: SAS Log

 
 
WARNING: Two or more identifiers have the same value. Each value must be unique.
NOTE: The Cloud Analytic Services server processed the request in 0.015293      
      seconds.                                                                  
 
 


For more information about how to specify an output data table that contains validation results, see Example 6.1: Validating Identifier Uniqueness in Input Data.

Last updated: January 14, 2026