BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cristiangaribay
Fluorite | Level 6

I am having trouble with the first activity in Lesson 2.

 

"Write a PROC CONTENTS step to generate a report of the storm_summary.sas7bdattable.

  • SAS Studio: Specify the path to your EPG194/data folder and the full name of the table."

I am using SAS Studio to run the Statement but i keep getting an error. Below are different ways i am writing the statement and i keep getting the following errors:         ERROR: File FILEPATH/storm_summary.sas7bdat does not exist.

                 

                                    ERROR: File EPG194/storm_summary.sas7bdat does not exist.

 

                                    ERROR: File EPG194/data/storm_summary.sas7bdat does not exist.

 

proc contents data="EPG194/data/storm_summary.sas7bdat";
run; 

proc contents data="FILEPATH/storm_summary.sas7bdat";
run;

proc contents data="EPG194/storm_summary.sas7bdat";
run;

 Any help is appreciated!!

1 ACCEPTED SOLUTION

Accepted Solutions
cristiangaribay
Fluorite | Level 6

Hi Reeza,

 

I tried this Statement:

proc contents data="&filepath/storm_summary.sas7bdat";
run;

and got this error message and warning:

WARNING: Apparent symbolic reference FILEPATH not resolved.
ERROR: Path "&filepath" does not exist.
 
This is the answer that is being listed:
Screen Shot 2018-12-04 at 9.15.14 PM.png
 
I added snapshots on how i organized the file.
 
Screen Shot 2018-12-04 at 9.08.51 PM.pngScreen Shot 2018-12-04 at 9.11.18 PM.png

View solution in original post

24 REPLIES 24
Reeza
Super User
I'm fairly certain that 'file path' is an actual path, not file path. I think it's a macro variable you set up when you start? Try changing it to &filepath or to the location of where you stored those files. If you're using SAS UE, it may be in the form, "/folders/myfolders/EPG194/...."
cristiangaribay
Fluorite | Level 6

Hi Reeza,

 

I tried this Statement:

proc contents data="&filepath/storm_summary.sas7bdat";
run;

and got this error message and warning:

WARNING: Apparent symbolic reference FILEPATH not resolved.
ERROR: Path "&filepath" does not exist.
 
This is the answer that is being listed:
Screen Shot 2018-12-04 at 9.15.14 PM.png
 
I added snapshots on how i organized the file.
 
Screen Shot 2018-12-04 at 9.08.51 PM.pngScreen Shot 2018-12-04 at 9.11.18 PM.png
Cynthia_sas
SAS Super FREQ

Hi:
It looks like you have the data in your SAS Studio folders. So what you need to do is right click on the EPG194/data folder and select Properties. It looks like you are using SAS OnDemand for Academics. What you should see in Properties is a fully qualified path that starts:
/home/<youruserID>/EPG194/data

If you copy that path and replace the word "FILEPATH" with the fully qualified path from Properties, the code should run. Please consider this view of MY SAS OnDemand account and the PROC CONTENTS to run for Storm_Summary.sas7bdat:

soda_storm_summary.png

Hope this helps clarify that anytime you see FILEPATH in the instructions, you are meant to replace that string with YOUR location, as shown above.

 

Cynthia

cristiangaribay
Fluorite | Level 6

Worked perfectly. Appreciate the help! 

stephaneb2017
Calcite | Level 5

I confirm as well for me, a bit tricky 

 

here my proc:

proc contents data="/home/name/EPG194/data/storm_summary.sas7bdat";
run;

Cynthia_sas
SAS Super FREQ

Hi:
I assume that your userid is NOT "name". For example, if your userid is johndoe0, then the correct path would be:
data="/home/johndoe0/EPG194/data/storm_summary.sas7bdat"

and if your userid for the SAS OnDemand server was franbell, then the data= option would be:
data="/home/franbell/EPG194/data/storm_summary.sas7bdat"

Later on in the course, we'll show you how to make a "nickname" or a library reference for the long path, so you won't have to keep typing
/home/youruserid/EPG194/data to point to your data folder.

 
Cynthia

dilwariac
Calcite | Level 5

Hello Cynthia,

 

Can you please guide how to use the correct version of SAS rather using SAS on Demand for Academics? Thanks a lot in advance!!

 

 

Cynthia_sas
SAS Super FREQ

Hi:

  I don't understand what you mean by "correct" -- SAS OnDemand for Academics is a client/server version of SAS, with SAS Studio as the client and with the server software on our cloud server. What is on the server is "correct" SAS. Is it a single user copy of SAS? No? But there are many people who use client/server versions of SAS. Some use Enterprise Guide as the client software, some use SAS Studio as the client software and some use other software applications (Enterprise Miner, SAS Add-in for Microsoft Office, SAS Visual Analytics) as their client method or interface to access SAS.

 

  Anyone can use SAS OnDemand for Academics as a zero footprint, browser-based, free way of using SAS for non-commercial learning purposes.

 

  If you want a different version of SAS Software to use, you either have to buy it or use it under a work or school license.

 

Cynthia

u43388129
Calcite | Level 5

what is the answer to the number of observations? 

please help 

 

Cynthia_sas
SAS Super FREQ

Hi:
It is our intention for you to run programs so you can answer that question yourself, by running the programs for the activities and practices.

If you want to find the number of observations after running PROC CONTENTS, look at the top of the output in the Results window. For example, running PROC CONTENTS on SASHELP.CLASS as shown below:

proc contents data=sashelp.class;

run;

or

proc contents data='<fully qualified path and file name>';

run;

Results (partial):

obs_sashelp_class.png

 

  Look at the highlighted part of the table for Observations -- this is the number of observations or rows. The other number -- variables -- represents the number of columns or variables.

Cynthia

u43388129
Calcite | Level 5
Found it! Thanks ##- Please type your reply above this line. No
attachments. -##
am1231
Calcite | Level 5

Your advice and visuals worked for me as well! Thank you!

LisaTran
Calcite | Level 5

it works. thank you

scrita
Calcite | Level 5

Thanks! That worked for me as well!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 24 replies
  • 11537 views
  • 57 likes
  • 14 in conversation