BookmarkSubscribeRSS Feed
joowens
Calcite | Level 5

I'm trying to reference macros that are stored in my CAS User folder in various other programs.  I keep getting an error saying the physical file doesnt exist.  Can you use %include as a CAS function?  How do you reference the file path?  Is the syntax different?  For example, some CAS syntax I have used uses spaces in the path vice "/"s.   Any help would be greatly appreciated.

 

Thanks,
JO

4 REPLIES 4
alexal
SAS Employee

@joowens ,

 

Please show me a SAS log with an error.

joeFurbee
Community Manager

I'm moving this post to the Developers Community as we are sunsetting Coding on SAS Viya.

 

This may be tangentially related to a question a few days ago in this post.

 

Depending on your SAS Viya environment set up, you may need to use the FILESRVC Access method in the filename statement. Please access the earlier reference post for an explanation and code samples.

 

If this does not solve your issues, as @alexal stated, logs will be helpful.

 

 


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

kumardeva
SAS Employee
Can you post a snippet of what you are doing and where ( in proc cas? in casl on server? others?). I have inkling of what you are trying to do but not really sure...
Cheers...
Deva

Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now:

acozzilepri
Fluorite | Level 6

Hi

I am having the same issue. It looks like %include is not allowed in CAS

Is there a way to recall a pre-written SAS macro without inserting all the lines directly into the programme?

Thank you,

Alessandro

 

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
  • 4 replies
  • 2398 views
  • 2 likes
  • 5 in conversation