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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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