There is an option for that, DKRICOND.
782 data y2010(keep=a b c d) y2011(keep=a b);
783 retain a b c d 0;
784 run;
NOTE: The data set WORK.Y2010 has 1 observations and 4 variables.
NOTE: The data set WORK.Y2011 has 1 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
785 proc options option=DKRICOND;
786 run;
SAS (r) Proprietary Software Release 9.2 TS2M0
DKRICOND=ERROR Action for DROP/KEEP/RENAME error conditions on input SAS data sets
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
787 data all;
788 set
789 y2010(keep=a b c d)
790 y2011(keep=a b c d)
791 ;
ERROR: The variable c in the DROP, KEEP, or RENAME list has never been referenced.
ERROR: The variable d in the DROP, KEEP, or RENAME list has never been referenced.
792 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.ALL may be incomplete. When this step was stopped there were 0 observations and 4 variables.
WARNING: Data set WORK.ALL was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
793
794 option DKRICOND=NOWARN;
795 data all;
796 set
797 y2010(keep=a b c d)
798 y2011(keep=a b c d)
799 ;
800 run;
NOTE: There were 1 observations read from the data set WORK.Y2010.
NOTE: There were 1 observations read from the data set WORK.Y2011.
NOTE: The data set WORK.ALL has 2 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds
801 option DKRICOND=ERROR;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: