BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ybz12003
Rhodochrosite | Level 12

Hi expers,

 

I would like to run ten programs in the same SAS folder with different names.  The following program 'test_combine_sample.SAS' is one of them.  I found out my %Include didn't work.

%let dirb=%str(\\C:\document\project\user\programs\sas\);

%include "&dirb.test_combine_sample.sas"; 

The log showed that

ERROR: Cannot open %INCLUDE file

\\C:\document\project\user\programs\sas.test_combine_sample.sas

 

I feel strange that I did add backslash '\' in the macro dirb.   However, it seems like SAS didn't read that.   Please let me know how to fix this problem.  Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ybz12003
Rhodochrosite | Level 12

Never mind, I know where went wrong.

View solution in original post

2 REPLIES 2
ybz12003
Rhodochrosite | Level 12

One thing is when I add two lines together, the code works.

 

%include "\\C:\document\project\user\programs\sas\test_combine_sample.sas"; 

 

When seperating into two lines as shown above,  the '\' between 'SAS' and 'test_combine_sample.sas' is missing

ybz12003
Rhodochrosite | Level 12

Never mind, I know where went wrong.

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
  • 2 replies
  • 362 views
  • 0 likes
  • 1 in conversation