Specifies the type of message to write to the SAS log when the input data set is read using the SET, MERGE, UPDATE, or MODIFY statements.
|Valid in:||Configuration file, SAS invocation, OPTIONS statement, SAS System Options window|
|Category:||Files: SAS Files|
|PROC OPTIONS GROUP=||SASFILES|
|Default:||The shipped default is WARN.|
|Note:||This option can be restricted by a site administrator. For more information, see Restricted Options.|
specifies that no warning message is issued when the length of a variable that is being read is larger than the length that is defined for the variable.
specifies that a warning is issued when the length of a variable that is being read is larger than the length that is defined for the variable.
specifies that an error message is issued when the length of a variable that is being read is larger than the length that is defined for the variable.
WARNING: Multiple lengths were specified for the BY variable x by input data sets. This may cause unexpected results.
set sashelp.class;. The exam_schedule data set sets the length of Name to 10. When exam_schedule is read in the second SET statement,
set exam_schedule key=Name;, SAS issues a warning message because the length of Name in the exam_schedule data set is longer than the length of Name in the sashelp.class data set, and data might have been truncated.
/* Create the exam_schedule data set. */ data exam_schedule(index=(Name)); input Name : $10. Exam_Date : mmddyy10.; format Exam_Date mmddyy10.; datalines; Carol 06/09/2011 Hui 06/09/2011 Janet 06/09/2011 Geoffrey 06/09/2011 John 06/09/2011 Joyce 06/09/2011 Helga 06/09/2011 Mary 06/09/2011 Roberto 06/09/2011 Ronald 06/09/2011 Barbara 06/10/2011 Louise 06/10/2011 Alfred 06/11/2011 Alice 06/11/2011 Henri 06/11/2011 James 06/11/2011 Philip 06/11/2011 Tomas 06/11/2011 William 06/11/2011 ; run /* Merge the data sets sashelp.class and exam_schedule */ data exams; set sashelp.class; set exam_schedule key=Name; run;
34 ods listing; 35 /* Create the exam_schedule data set. */ 36 data exam_schedule(index=(Name)); 37 input Name : $10. Exam_Date : mmddyy10.; 38 format Exam_Date mmddyy10.; 39 datalines; NOTE: The data set WORK.EXAM_SCHEDULE has 19 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.09 seconds cpu time 0.00 seconds 59 ; 60 run; 61 62 /* Merge the data sets sashelp.class and exam_schedule */ 63 data exams; 64 set sashelp.class; 65 set exam_schedule key=Name; 66 run; WARNING: Multiple lengths were specified for the variable Name by input data set(s). This may cause truncation of data. Name=Henry Sex=M Age=14 Height=63.5 Weight=102.5 Exam_Date=06/09/2011 _ERROR_=1 _IORC_=1230015 _N_=5 Name=Jane Sex=F Age=12 Height=59.8 Weight=84.5 Exam_Date=06/11/2011 _ERROR_=1 _IORC_=1230015 _N_=7 Name=Jeffrey Sex=M Age=13 Height=62.5 Weight=84 Exam_Date=06/09/2011 _ERROR_=1 _IORC_=1230015 _N_=9 Name=Judy Sex=F Age=14 Height=64.3 Weight=90 Exam_Date=06/09/2011 _ERROR_=1 _IORC_=1230015 _N_=12 Name=Robert Sex=M Age=12 Height=64.8 Weight=128 Exam_Date=06/11/2011 _ERROR_=1 _IORC_=1230015 _N_=16 Name=Thomas Sex=M Age=11 Height=57.5 Weight=85 Exam_Date=06/09/2011 _ERROR_=1 _IORC_=1230015 _N_=18 NOTE: There were 19 observations read from the data set SASHELP.CLASS. NOTE: The data set WORK.EXAMS has 19 observations and 6 variables.
set exam_schedule;statement. If the value of VARLENCHK is WARN (the default), SAS issues the warning message that the value of Name is truncated when it is read from work.exam_schedule. Because you know that data is not lost, you might want to turn the warning message off:
options varlenchk=nowarn; data exam_schedule(index=(Name)); length Name $ 8; set exam_schedule; run;