BookmarkSubscribeRSS Feed
stancemcgraw
Obsidian | Level 7

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

 

1 REPLY 1
ballardw
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 735 views
  • 0 likes
  • 2 in conversation