BookmarkSubscribeRSS Feed
Shakhane
Calcite | Level 5
proc contents data="/folders/myfolders/epg194/data/storm_summary.sas7dat";

I am encountering this error, could you please lead me to the right direction:

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72        
73         proc contents data="/folders/myfolders/epg194/data/storm_summary.sas7dat";
ERROR: Extension for physical file name "/folders/myfolders/epg194/data/storm_summary.sas7dat" does not correspond to a valid
        member type.
74         run;
 
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
      
NOTE: The SAS System stopped processing this step because of errors.
75        
76         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

 

4 REPLIES 4
Shmuel
Garnet | Level 18

For proc contents you need to supply a sas dataset name in a form of libname,dsname.

 

Try next code:

libname mydata "/folders/myfolders/epg194/data";

proc contents data=mydata.storm_summary; run;
Tom
Super User Tom
Super User

The extension used by SAS for datasets is sas7bdat.  You did not include the letter b.  Is your file misnamed or is it just a typo in the program?

Shakhane
Calcite | Level 5

My apology, I skipped the setup instructions on the training lessons, thanks for your support. It is working now.

hak18
Calcite | Level 5

You also can use the next :

 

%let path = /folders/myfolders/epg194/data/
proc contents data= "&path/storm_summary";
run;

 

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 611 views
  • 1 like
  • 4 in conversation