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;

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 1200 views
  • 1 like
  • 4 in conversation