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

When creating a macro, it should be saved in "work.sasmacr", but I do not have it and are wondering how I can find out where they are saved. 

I am using SAS EG. 


1 ACCEPTED SOLUTION

Accepted Solutions
SasStatistics
Pyrite | Level 9
Thanks, the solution is (In SAS EG):
Tools > Catalog and Formats Explorer > Work and there is a library called SASMAC1.

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

If no macros have been defined, then work.sasmacr does not exist. As soon as you define a macro (or call one from the AUTOCALL library) then work.sasmacr is created for you.

 

If you have defined a macro and it doesn't show in work.sasmacr (or work.sasmacr doesn't exist) then please explain in a lot more detail what you did, and SHOW US your code.

--
Paige Miller
Tom
Super User Tom
Super User

@SasStatistics wrote:

When creating a macro, it should be saved in "work.sasmacr", but I do not have it and are wondering how I can find out where they are saved. 

I am using SAS EG. 



What do you mean by "created"?  To define a macro you run code that includes %MACRO and %MEND statements.  

Do you have that code saved somewhere? If so just re-run it.

 

Note also that if you are using Enterprise Guide or SAS/Studio or some other tool to submit your SAS code then the catalog name where compiled macros are stored will have a slightly different name: WORK.SASMAC1

SASKiwi
PROC Star

Later versions of SAS EG have a built-in SAS Catalog Viewer. Check the menu options - I think it is under Tools. You should be able to find WORK.SASMACR there.

 

Fun Fact: The SASMACRO name is a relic from early versions of SAS where SAS file names were limited to 8 characters.

SasStatistics
Pyrite | Level 9
Thanks, the solution is (In SAS EG):
Tools > Catalog and Formats Explorer > Work and there is a library called SASMAC1.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 5 replies
  • 3405 views
  • 3 likes
  • 5 in conversation