Help using Base SAS procedures

getting note: dataset has 0 observations and x amount of variables

Reply
N/A
Posts: 0

getting note: dataset has 0 observations and x amount of variables

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)Smiley SadColumn).
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?
SAS Super FREQ
Posts: 8,862

Re: getting note: dataset has 0 observations and x amount of variables

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: getting note: dataset has 0 observations and x amount of variables

Posted in reply to deleted_user
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)Smiley SadColumn).
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
Contributor
Posts: 35

Re: getting note: dataset has 0 observations and x amount of variables

Posted in reply to deleted_user
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.
N/A
Posts: 0

Re: getting note: dataset has 0 observations and x amount of variables

Posted in reply to deleted_user
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)
SAS Super FREQ
Posts: 8,862

Re: getting note: dataset has 0 observations and x amount of variables

Posted in reply to deleted_user
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
Ask a Question
Discussion stats
  • 5 replies
  • 125 views
  • 0 likes
  • 3 in conversation