BookmarkSubscribeRSS Feed
Komal2
Calcite | Level 5

I would like to save all the macros permanently defined as part of the complete exercise and list all the macros. I have 6 macros which I want to save and retrieve in this session:

%macro one(a,b,c)
%macro gchart(dseti,Weight,Gender)
%macro plot(dsetin,height,weight)
%macro one(a,b,c,strtpt,endpt)
%macro test
%macro name(dsetin,year,revenue)
%macro import_myfile(i=)

I have the code below and the error message follows it.

options mstored sasmstore=macross; 
libname mjstore "C:\Users\komal\Desktop\Advanced SAS"; 
 proc catalog cat=mjstore.macross;
      contents;
      title "Default Storage of SAS Macros";
     quit

Error: Catalog "MJSTORE.MACROSS" not found

Please let me know your advice on how to solve it. Thank you for your time.

3 REPLIES 3
Kurt_Bremser
Super User

This:

Error: Catalog "MJSTORE.MACROSS" not found

tells you that there is no file

macross.sas7bcat

in directory

C:\Users\komal\Desktop\Advanced SAS

Maybe you wanted to use

MJSTORE.MACROS

?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Avoid using compiled catalogs, save macro's as text files and include them or put them as part of the auto call.  Compiled libraries are bad, compatability between systems/bits is poor, code is hidden making updating or general use so much harder.  

Reeza
Super User

If your macros are not declared with the SOURCE option it's hard to get the code back out. Did you declare them with the SOURCE option? 

 

 

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
  • 3 replies
  • 750 views
  • 0 likes
  • 4 in conversation