BookmarkSubscribeRSS Feed
mychanab
Calcite | Level 5

I wrote this code in sas under mac 

infile "/Users/mandychan/Desktop/student.txt" options; 

 

and there is error popping up in the log,

infile "/Users/mandychan/Desktop/student.txt" options;
______
180
 
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
can anyone help to solve this question? is it the problem of the path
3 REPLIES 3
Ksharp
Super User

If you are using University Edition . Should look like :

 

infile '/folders/myfolders/test.txt';

 

Or use the following code to check how your paht should look like .

 

%let x=%sysfunc(pathname(work));
%put &x ;
Reeza
Super User
1. Go back and read the installation instructions
2. Verify shared drive is set up (myfolders)
3. Move file to myfolders
4. Use path as follows '/folders/myfolders/student.txt';
SASKiwi
PROC Star

You need to precede your INFILE statement with a DATA statement:

 

data mandy;

  infile .......;

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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
  • 3 replies
  • 4764 views
  • 1 like
  • 4 in conversation