Specifies to save observations with non-unique key values (the rejected observations) to a separate data set when appending or inserting observations to data sets with unique indexes.
Valid in: | PROC APPEND and PROC SQL |
Used by: | SPDSUSDS automatic macro variable |
Default: | NO |
Interaction: | SYNCADD= Data Set Option |
Engine: | SPD Engine only |
if SYNCADD=NO, writes rejected observations to a separate, system-created data set, which can be accessed by a reference to the macro variable SPDSUSDS.
does not write rejected observations to a separate data set.
1 libname employee spde 'c:\temp'; NOTE: Libref EMPLOYEE was successfully assigned as follows: Engine: SPDE Physical Name: c:\temp\ 2 3 data employee.emp1 (index=(phone/unique room/unique)); 4 input name $ phone room; 5 list; 6 datalines; RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ 7 Jill 4344 456 8 Jack 5589 789 9 Jim 8888 345 10 Sam 3334 657 NOTE: The data set EMPLOYEE.EMP1 has 4 observations and 3 variables. 11 run; 12 13 data employee.emp2; 14 input name $ phone room; 15 list; 16 datalines; RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ 17 Jack 8443 679 18 Ann 3334 987 19 Sam 8756 346 20 Susan 5321 456 NOTE: The data set EMPLOYEE.EMP2 has 4 observations and 3 variables. 21 run; 22 23 proc append base=employee.emp1(syncadd=no uniquesave=yes) NOTE: Writing HTML Body file: sashtml.htm 24 data=employee.emp2; 25 run; NOTE: Appending EMPLOYEE.EMP2 to EMPLOYEE.EMP1. NOTE: There were 4 observations read from the data set EMPLOYEE.EMP2. NOTE: 2 observations added. NOTE: The data set EMPLOYEE.EMP1 has 6 observations and 3 variables. WARNING: Duplicate values not allowed on index phone for file EMP1, 1 observations rejected. WARNING: Duplicate values not allowed on index room for file EMP1, 1 observations rejected. NOTE: Duplicate records have been stored in file EMPLOYEE._SPDEDUP048604700067A9F340C7E3E6. 26 27 proc print data=employee.emp1; 28 title 'Listing of Final Data Set'; 29 run; NOTE: There were 6 observations read from the data set EMPLOYEE.EMP1. 30 31 proc print data=&spdsusds 32 title 'Listing of Rejected observations'; 33 run; NOTE: There were 2 observations read from the data set EMPLOYEE._SPDEDUP048604700067A9F340C7E3E6.