BookmarkSubscribeRSS Feed
DejanPeeski
Calcite | Level 5

If macro is not stored (it was not use "/store source" when the macro was created ) in SAS can i see the code of the macro somehow?

3 REPLIES 3
PaigeMiller
Diamond | Level 26

The macro would have to be saved as a .SAS program (which is just a text file), in which case the SAS Program Editor, or the SAS ENhanced Editor, or any text editor, can show you the macro code.

--
Paige Miller
data_null__
Jade | Level 19

You can look in the catalog with INFILE/INPUT.  If the macro is mostly SAS Code you will see lots of stuff that you recognize.  Otherwise you will need to reverse engineer the compiled bits.  Change work.sasmac1 to your catalog and EXT...NAME to the macro name.

filename FT66F001 catalog 'work.sasmac1';
data _null_;
  
infile FT66F001('EXTENDVALIDMEMNAME.macro');
   input;
  
list;
  
run;

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
  • 868 views
  • 0 likes
  • 3 in conversation