DATA Step, Macro, Functions and more

Creating a file in SAS

Reply
New Contributor
Posts: 3

Creating a file in SAS

Hi guys,

I am currently listening to a SAS tutorial and have been trying to follow up instructions on creating a practice file. The code I need to use is:

%let path=FILEPATH/ecprg193

libname orion "&path";

 

Where ecprg193 is the file which carries the work sheets. I correctly defined the Filename and used the code below to create my folder:

%let path=C:/Users/ndiku/Desktop/ecprg193

libname orion "&path";

 

After entering this, it gives me an error message.

 

Can anyone advice me on correcting the code? or where I went wrong?

Thanks

 

Super User
Posts: 17,784

Re: Creating a file in SAS

Are you using SAS University Edition?

 

 

If so, see the help center on setting up. You need to create a shared drive ('/folders/myfolders') place the files in there and then you can use them in SAS.

http://support.sas.com/software/products/university-edition/faq/main.htm

 

If you're not using SAS UE, please post the error.

Super User
Posts: 10,487

Re: Creating a file in SAS

Please post the error message text. Also, which version of SAS are you using.

 

There is a system option availabe in SAS 9.3 that needs to be set to create a file if the path does not already exist and in versions prior to 9.3 the the entire path must exist prior to use.

 

And as @Reeza said, University edition has additional requirements on where you can access files.

Senior User
Posts: 1

Re: Creating a file in SAS

in the 1st line i think you missed semicolon ..you can write code in 2 ways 

1st :

=========

%let path=C:/Users/ndiku/Desktop/ecprg193;

libname orion "&path";

 

2nd Way :

libname orion 'C:/Users/ndiku/Desktop/ecprg193' ;

 

 

Ask a Question
Discussion stats
  • 3 replies
  • 196 views
  • 0 likes
  • 4 in conversation