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

Hi

 

I am new to SAS and learning SAS.

 

I am trying to work on thsi example to import this txt file which i created in notepad and its saved as txt file.

 

when i try to import file it says physical file doesnt exist , please advise.

i have just typed this data in notepad to create this raw data :

 

RANCH,1250,2,1,Sheppard Avenue,"$64,000"
SPLIT,1190,1,1,Rand Street,"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1500,3,3,Kemble Avenue,"$86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"

 

saved this file as location.txt in note pad

 

now tried to import it :

 

data location1;
infile 'C:\Users\tauqe\Documents\myfolders\location.txt' ;
input style $ @;
if style = 'CONDO' or style = 'RANCH';
input sqfeet bedrooms baths street $ price : dollar10.;
run;

 

error message:

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\Users\tauqe\Documents\myfolders\location.txt.

NOTE: The SAS System stopped processing this step because of errors
 
 
please advise.
 
1 ACCEPTED SOLUTION

Accepted Solutions
jklaverstijn
Rhodochrosite | Level 12

An often seen mistake where you confuse the local Windows environment of your pc or laptop with the Linux environment of the server. The SAS server session that your Studio is connected to and that executes the code is not directly aware of the files on your Windows drives. You can use the file upload task or drag and drop in the files tree to move your data from Widows to Linux (or more prcisely: from client to server) to make your code run.

 

The giveaway here is the filename in the message that has a Linux part (/opt/sasinside/SASConfig/Lev1/SASApp) and a Windows part (C:\Users\tauqe\Documents\myfolders\location.txt).

 

Hope this helps.

- Jan.

View solution in original post

2 REPLIES 2
jklaverstijn
Rhodochrosite | Level 12

An often seen mistake where you confuse the local Windows environment of your pc or laptop with the Linux environment of the server. The SAS server session that your Studio is connected to and that executes the code is not directly aware of the files on your Windows drives. You can use the file upload task or drag and drop in the files tree to move your data from Widows to Linux (or more prcisely: from client to server) to make your code run.

 

The giveaway here is the filename in the message that has a Linux part (/opt/sasinside/SASConfig/Lev1/SASApp) and a Windows part (C:\Users\tauqe\Documents\myfolders\location.txt).

 

Hope this helps.

- Jan.

Reeza
Super User

If you're using SAS UE refer to the set up instruction for the book or course you're using to set it up in SAS UE. 

 

Or check the Analytics U forum for many questions like this. 

 

Or search the SAS University Edition Help Centre on how to access your files. 

 

Or see the intro videos for SAS UE on videos.sas.com under How To tutorials. 

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
  • 1312 views
  • 1 like
  • 3 in conversation