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

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