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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1379 views
  • 0 likes
  • 3 in conversation