10-28-2014 05:50 PM
when i merge 2 files i get:
WARNING: Multiple lengths were specified for the BY variable cusip by input data sets. This
might cause unexpected results.
i noticed that the fyear for two files are different.
how do i change one of the following, for ex: file2's 4. to best12.?
10-28-2014 05:58 PM
Issue is not format but the actual number of bytes used to store the variable in the two datasets.
If you run proc contents or examine the variables in the Explorer you will see that the LENGTH is different.
Without rebuilding the data sets generally a good approach would be to have the data set with the larger value for length first in a set or merge statement.
Or make a copy of the data set with the smaller value
length cusip 8; /* guessing the set with the larger value of length for cusip is 8 as that is a default for numeric*/
set file2; /* guessing this is the set with the smaller length*/
and use want instead of file2.
10-29-2014 03:29 AM
If you change the order of the datasets this warning will desapear.
Also if you change the format before the "set" with format var BEST12. it will be solved too.