BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am running several proc statements and when I run them I get most of my outputs, but for six of them I get nothing. I get the message NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
269:4 270:4 271:4 272:4 273:4 274:4 279:17 279:50 279:80 285:7
285:49 286:4 286:30 286:55 287:21 290:27 291:27 292:27 293:26 295:9
NOTE: There were 2829 observations read from the data set 2
NOTE: The data set 6 has 0 observations and 130 variables.
I have tried changing the order of the programming statements but that does not help. Does anyone have any suggestions?
5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
This is really an instance where you might consider contacting Tech Support. There are many different reasons why or how you could get a message about a data set with 0 observations. People in the forum would need to see all your code, which is probably lengthy, before they could venture a solution.

Tech Support could open a track for your question, they could look at ALL your code and how you're reading your data and help you figure out the correct solution.

To send a question to or open a track with Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia
deleted_user
Not applicable
I will post the smallest code here, the others are larger

Data Pnssnineteen;
630 set Pnss1;
631 /*Drinking last three months of pregnancy*/
632 if DrinksWeek_Last_3_Months=. or DrinksWeek_Last_3_Months =99 then delete;

633 preg_drinking=0;
634 if 21 >= DrinksWeek_Last_3_Months =>1 or DrinksWeek_Last_3_Months=98 then preg_drinking=1;

635 run;

NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
632:4 632:34 634:10 634:42
NOTE: There were 2218 observations read from the data set WORK.PNSS1.
NOTE: The data set WORK.PNSSNINETEEN has 0 observations and 122 variables.
NOTE: DATA statement used:
real time 0.00 seconds
cpu time 0.00 seconds
DouglasMartin
Calcite | Level 5
Firstly, you should probably make your DrinksWeek_Last_3_Months a numeric variable rather than a character variable (that's what the "Character values have been converted..." alludes to).

From that code segment, it looks like all incoming records have a value of " " or "99" for DrinksWeek_Last_3_Months. If that is not the case, then you would need to post a sample of your data.
deleted_user
Not applicable
the drinks variable is numberic, either they put in a number or it is blamk, or a period (those are or should have been excluded)
Cynthia_sas
SAS Super FREQ
Hi:
This is really an instance where you might consider contacting Tech Support.

Tech Support could open a track for your question, they could look at ALL your code and ALL your data, how you're reading your data and help you figure out the correct solution.

To send a question to or open a track with Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 960 views
  • 0 likes
  • 3 in conversation