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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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