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

Hello everyone,

 

I uploaded the .dat file "Boats" to myfolders,

and used &"dirdata" command.

but I got error message.

Is anyone can help me take a look at what I had done wrong?

Thanks!

 

The code I put in SAS Studio is as below:

%let dirdata='/folders/myfolders';

data boats;
set '&dirdata/Programs/Week_3/Boats.dat';
run;

proc print data=boats;
run;

The LOG is :

 

 
 
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         %let dirdata='/folders/myfolders';
 74         
 75         data boats;
 76         set '&dirdata/Programs/Week_3/Boats.dat';
 ERROR: Extension for physical file name "&dirdata/Programs/Week_3/Boats.dat" does not correspond to a valid member type.
 77         run;
 
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set WORK.BOATS may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
 WARNING: Data set WORK.BOATS was not replaced because this step was stopped.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 78         
 79         proc print data=boats;
 80         run;
 
 NOTE: No variables in data set WORK.BOATS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 81         
 82         
 83         
 84         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 97         
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisBrooks
Ammonite | Level 13

You can only read SAS data files with the SET statement - the .dat extension is not tied to any particular application so you'll need to find out what format it is in before attempting to read it into SAS.

View solution in original post

2 REPLIES 2
ChrisBrooks
Ammonite | Level 13

You can only read SAS data files with the SET statement - the .dat extension is not tied to any particular application so you'll need to find out what format it is in before attempting to read it into SAS.

jc3992
Pyrite | Level 9

Got it.

 

Thanks! I thought "Set" is so good to use.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 679 views
  • 1 like
  • 2 in conversation