BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Being part of a small team that uses Ent. Guide, Stored Processes and Web Report Studio, I am finding that I'm creating macros that replace repetitive code, such as parameter processing, date checking and the like.

My question: How and where can I store these macros, so that I can use them in different stored processes? I currently have to copy and paste macro code, and would much prefer to be able to pull in a stored macro (or two or three...).

Any help/advice is greatly appreciated. Thanks!
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
You want to store your macro code in an "autocall" location. When you installed the BI Platform you defined an "application server context" -- in our examples, we call it SASMain. Under the SASMain directory where your metadata server (I think) is located, you should find a Lev1 subdirectory with a SASEnvironment subdirectory -- I don't remember the exact path -- you have to look in your Administration guide. Anyway, there's a place in the SASEnvironment subdirectory for your formats catalog, your autocall macros and any SAS code snippets that you are going to %include. (You might get this info more accurately, if you checked with Tech Support.)

(not on my work machine at the moment.)
cynthia
deleted_user
Not applicable
Thank you, Cynthia.... I'll check it out.

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