Show the LOG from the step that did this. Copy the entire text of the data step or Procedure with ALL notes, warnings and messages. Paste into a code box opened on the forum with the </> to preserve text formatting.
I will bet a largish stack of $$ that your log will say something like.
WARNING: Multiple lengths were specified for the variable x by input data set(s). This can cause truncation of data.
Which means that you need to determine which variable(s) lengths are longer and address the issue. HOW depends on the method you used to append the sets.
Warning: If your data is originally coming from Proc Import or other import wizard you will find yourself having to fix this frequently when reading files with common variables. Each separate import makes guesses as to the lengths of variables based on rows examined and can change quite a bit from file to file based on content.
Use a data step to concatenate the datasets, where you set the lengths before the SET statement.
The proper way of avoiding this in a production environment is, of course, to avoid Excel files altogether. Save the data to a sensible format (CSV or similar), which you can read with a consistent data step.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.