BookmarkSubscribeRSS Feed
mkit8
Fluorite | Level 6

Hi,

 

I am VERY new to SAS. Very new and very confused....

For a homework assignment, we were given a sas7bdat file and were told to run proc univariate. I thought I was doing this correctly, but am not able to get any output.

 

Please see screenshots of the code I came up with below (and the errors that I received). I'm not sure what version of SAS I use. It is something that is available to me online through my school's application gateway (9_4 maybe?) I'm not sure what other information would be helpful to share.

 

Screen Shot 2019-01-21 at 10.24.25 AM.pngScreen Shot 2019-01-21 at 10.25.12 AM.png

 

Please help!!

 

Melody

5 REPLIES 5
Reeza
Super User

I recommend watching this video. 

The first three minutes are about text files, then goes into using SAS data sets. 

 

https://video.sas.com/detail/videos/sas-analytics-u/video/4664335810001/accessing-your-existing-data...

 

 I think about 3:30 to 5:00 is what you need. 


@mkit8 wrote:

Hi,

 

I am VERY new to SAS. Very new and very confused....

For a homework assignment, we were given a sas7bdat file and were told to run proc univariate. I thought I was doing this correctly, but am not able to get any output.

 

Please see screenshots of the code I came up with below (and the errors that I received). I'm not sure what version of SAS I use. It is something that is available to me online through my school's application gateway (9_4 maybe?) I'm not sure what other information would be helpful to share.

 

Screen Shot 2019-01-21 at 10.24.25 AM.pngScreen Shot 2019-01-21 at 10.25.12 AM.png

 

Please help!!

 

Melody


 

mkit8
Fluorite | Level 6

Thank you, Reeza!

PaigeMiller
Diamond | Level 26

Instead of INFILE, you need a SET statement. Then you don't need the INPUT statement either.

 

SET statements are for data already in a SAS data set (or .sas7bdat file), while INFILE is for data that is in a text file.

 

Something like this:

 

set epi.frmgham;

In the future, do not show us screen captures of SAS code or the SAS log. Instead, first clicking on the running man icon (for SAS code) or the {i} icon (for SAS log) and then copy and paste the text into the window that appears.

--
Paige Miller
mkit8
Fluorite | Level 6

Thank you, PaigeMiller!

Reeza
Super User

And unfortunately if you ran this code you may have damaged or destroyed your input data set. You may need to first replace it, and then implement the changes. 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 1183 views
  • 0 likes
  • 3 in conversation