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

Hello everyone,

 

I have a question about executing macro which is stored in an excel file. For example, here is my macro:

%macro ttl_fnt;
 title1  "Table 1" ;
 title2  "for height and weight of each group";
 footnote1   j=left "Study program 1"  
             j=right "Page 1 of 10";
 footnote2   j=left "Version &sysver"  
             j=right "Date: &sysdate9";
%mend ttl_fnt;

It's saved in excel and then I want to execute it in programming with base SAS. How to do it? 

 

I don't want to just put titles and footnotes in my sas, because I have several projects with same titles and footnotes except title1. Any suggestion is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Save your code in text files with a .sas extension, and use the %include statement to use it in a SAS program. Or (as it is a macro), use the autocall facility to make it available without including.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

Save your code in text files with a .sas extension, and use the %include statement to use it in a SAS program. Or (as it is a macro), use the autocall facility to make it available without including.

lc7033907
Obsidian | Level 7

Thank you so much, KurtBremser. I'll try your both ways. 

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!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 466 views
  • 0 likes
  • 2 in conversation