Learning SAS? Welcome to the exclusive online community for all SAS learners.

Input/Infile Statements

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Input/Infile Statements

Hi Cynthia,

I just installed the SAS University edition. I have followed direction on how to set VM and shared folder.

The folder is set on K: drive as K:\SASUniversityEdition\myfolders. It is shown in attached file.

 

I followed you advice in path 1. Here is the simple code I am running:

 

data veg;
Infile "folders/myfolders/veggies.txt";
input Name $ Code $ Days Number Price;
CostPerSeed = Price / Number;
run;

 

Still I have an error:

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 title "SAS Prog to read beggies data";
57 options nocenter nonumber;
58
59 data veg;
60 Infile "folders/myfolders/veggies.txt";
61 input Name $ Code $ Days Number Price;
62 CostPerSeed = Price / Number;
63 run;

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/folders/myfolders/veggies.txt.

 

I checked the veggies.txt location, it is in myfolders folder.

Should the shared folder be on C: only?

 

Thanks in advance 

Vladimir

 


20160220_Shared_folder_setting.png20160220_veggies.txt_location.png

Accepted Solutions
Solution
‎02-21-2016 08:01 AM
Super User
Posts: 17,776

Re: Input/Infile Statements

You missed the first / before folders. 

 

/folders/myfolders/veggies.txt

View solution in original post


All Replies
Solution
‎02-21-2016 08:01 AM
Super User
Posts: 17,776

Re: Input/Infile Statements

You missed the first / before folders. 

 

/folders/myfolders/veggies.txt
Occasional Contributor
Posts: 8

Re: Input/Infile Statements

Hi Reeza,

This is it - now I got this code work.

Thanks a lot.

 

Vladimir

Super User
Posts: 17,776

Re: Input/Infile Statements

PS If you address your post to one person do you only want that person to answer your question?

Occasional Contributor
Posts: 8

Re: Input/Infile Statements

 

Not necessarily just one person to answer.

First, this is my first look at this site getting from another  links

Then  Cynthia touched in clear terms  the problem I  was fightin for some time after installing University edition, and I I wanted  continue with it.

 

Regards

Occasional Learner
Posts: 1

Re: Input/Infile Statements

Reeza, i don't understand you meant by saying first/ before folders.
SAS Employee
Posts: 45

Re: Input/Infile Statements

@Jly00 What you need to do is reference your path by using /folders/myfolders instead of folders/myfolders

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 643 views
  • 1 like
  • 4 in conversation