BookmarkSubscribeRSS Feed
Rik
Calcite | Level 5 Rik
Calcite | Level 5
Hi,

Is there any way to retrieve the actual code of a compiled macro?
3 REPLIES 3
Olivier
Pyrite | Level 9
1) If the macro has been compiled with the SOURCE option, you can list the source in the Log window with [pre] %COPY yourMacroName / SOURCE LIB=library ;[/pre]
2) If 1) does not work, you're stuck.

Regards,
Olivier
PatrickG
SAS Employee
Olivier is correct. You cannot recreate the source statements from a compiled macro UNLESS it was created using the SOURCE option. If it was, you can then retrieve it using the %COPY statement as below.

One thing I will add is that by using the OUTFILE= option with the %COPY statement, the output can be directed to a file instead of the SAS Log.
PatrickG
SAS Employee
Oops, should have said "as above". Did not know new postings went at the bottom!

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