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

Infile Statement in SAS University

Reply
Occasional Contributor
Posts: 5

Infile Statement in SAS University

I am using SAS University and I am having trouble using the infile statement to bring a txt file into the system. How would I change SAS to accept files from my desktop on a Mac?

Thank you!

Super User
Posts: 17,868

Re: Infile Statement in SAS University

First make sure the VM has access to that folder by creating a shared folder. Then make sure to map it using UNIX path names, which is the same for macs as well:

Occasional Contributor
Posts: 5

Re: Infile Statement in SAS University

Hey Reeza, thank you for your help! Would I have to reference the Vm in the UNIX path name?

Occasional Contributor
Posts: 5

Re: Infile Statement in SAS University

And do you have an example, I haven't used UNIX much.

Thank you!

Super User
Posts: 17,868

Re: Infile Statement in SAS University

/user/jafericy/Documents/SASStudio

Depending on where you set up the shared folder I guess....

Occasional Contributor
Posts: 5

Re: Infile Statement in SAS University

I tried this but then I realized it would be more of a PC code.

data test c:\\testmuser\jafericy\Documents\SASStudio;

infile dep1 ind1 ind2;

run;

Do you have any suggestions? Sorry for all of the questions. The file is named test.tex and it is located in the Documents. This is my first time trying VM on a mac for graduate school so sorry for my ignorance.

Super User
Posts: 17,868

Re: Infile Statement in SAS University

Have you set up a shared folder first, see the first link I sent you.

Occasional Contributor
Posts: 5

Re: Infile Statement in SAS University

I tried:

OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;

;

libname jafericy '~' ;

But I am not sure how it worked.

Super User
Posts: 17,868

Re: Infile Statement in SAS University

Ask a Question
Discussion stats
  • 8 replies
  • 2584 views
  • 0 likes
  • 2 in conversation