BookmarkSubscribeRSS Feed
danweifis
Calcite | Level 5

Hi, I have a macro that is compiled "somewhere" once SAS does AUTOEXEC.

 

I know the macro's name: "%UPDD" - but I don't know where is the code that compile it. 

 

I tried several options such as : MAUTOLOCDISPLAY, and others and it doesn't work.

 

I made a test, I created a  a macrotest.sas file located in C:/TMP with a macro called %macrotest. THen in another program editor, in the same session using all those options, still in the log its not displayed the location: C:/TMP/macrotest.sas which I am looking for.

 

Please help

 

THanks

7 REPLIES 7
andreas_lds
PROC Star

In SAS EG the view sashelp.vextfl contains all paths that have been added to SASAUTOS. If MAUTOLOCDISPLAY doesn't display the path to the file containing the definition of the macro is not in SASAUTOS.

 

Why can't you look at the files used during session start?

 

 

danweifis
Calcite | Level 5

Thank you for the answer.

 

I guess I should be more accurate... the macro is executed on SCL frame ---- I guess. Is there a code available in order to help me on this?

 

THanks again

ballardw
Super User

@danweifis wrote:

Thank you for the answer.

 

I guess I should be more accurate... the macro is executed on SCL frame ---- I guess. Is there a code available in order to help me on this?

 

THanks again


That likely means that the code is in a catalog that the SCL is using, possibly as an SLIST entry (IIRC). Maybe.

So try to determine the catalogs used.

Then search the contents.

 

Or talk to the SAS admin about where that SCL source is. May be easier.

danweifis
Calcite | Level 5

thank you for the answer, seems this table stores macro values... what I am looking for is where is located the macro code: path + filename

 

 

LinusH
Tourmaline | Level 20

In this thread @Tom published a utility program that might help:

https://communities.sas.com/t5/SAS-Programming/Finding-Location-of-SAS-Macros/m-p/292713/highlight/t...

 

Data never sleeps
Tom
Super User Tom
Super User

Then most likely it is NOT an autocall macro.  When the macro is not compiled via autocall then it does not display an locaiton with that option.

 

Example:

3258  %macro updd;
3259  %put Note: Running &sysmacroname.;
3260  %mend updd;
3261  option mautolocdisplay;
3262  %updd;
Note: Running UPDD
3263  %put %tslit(xxx);
MAUTOLOCDISPLAY(TSLIT):  This macro was compiled from the autocall file C:\Program
                         Files\SASHome\SASFoundation\9.4\core\sasmacro\tslit.sas
'xxx'

So you need to look at your AUTOEXEC setting and the code it is running.

If you are using some tool like Enterprise Guide or SAS/Studio to send your code to SAS then you need to also look at what macros those tools have defined in your environment.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 203 views
  • 3 likes
  • 6 in conversation