Hello, Have a proc and merge sgtatement, but all of my observations are missing. Why does it keep deleting them?
NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).
3530:34
WARNING: Multiple lengths were specified for the variable Sex by input data set(s). This may cause truncation of data.
WARNING: Multiple lengths were specified for the variable Race by input data set(s). This may cause truncation of data.
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
980 at 3540:14 585 at 3541:22
NOTE: There were 1197 observations read from the data set CARES.INTAKE.
NOTE: There were 321 observations read from the data set CARES.OLDSET.
NOTE: There were 426 observations read from the data set CARES.ADDITIONAL.
NOTE: There were 336 observations read from the data set CARES.FINAL_POLICECALLS.
NOTE: There were 298 observations read from the data set CARES.FINAL_EDVISITS.
NOTE: There were 72 observations read from the data set CARES.FINAL_HOSPITALVISITS.
NOTE: There were 1252 observations read from the data set CARES.REFERRALS.
NOTE: The data set CARES.CARES7 has 0 observations and 133 variables.
NOTE: DATA statement used (Total process time):
real time 0.16 seconds
cpu time 0.14 seconds
You should show the CODE along with the log.
Likely you have an IF somewhere that none of your records actually meets.
For instance this from your log
WARNING: Multiple lengths were specified for the variable Sex by input data set(s). This may cause truncation of data.
WARNING: Multiple lengths were specified for the variable Race by input data set(s). This may cause truncation of data.
Means that these two variables involved in any comparison may not have the actual values you expect. IF one data set has sex as F and M and the other Female Male it could mean that the Female/Male are getting truncated to F or M. And if you write an IF statement using
If Sex='Female' then ... may never be true. If the result of that IF selects records to keep then problems.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.