SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
fbgeoff
Calcite | Level 5

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

 

3 REPLIES 3
Reeza
Super User

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.

ballardw
Super User

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.

sumitsagar1
Calcite | Level 5

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

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1357 views
  • 0 likes
  • 4 in conversation