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 .......;

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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