%add_project_specifics;
%if &jumptoexit %then %goto StopProcessingMacro;
How do I see this macro program in sas viya ( add_project_specifics).... if I save this program in my local drive
Thank you
souj
GoTo macro statement: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p0jfeh75p72icen1ddd9una5zbmm.htm
The %goto allows to "jump" directly from one place in the code to other.
Bart
You have not shared a macro. You appear to have shared two lines from the middle of a macro. So we don't know anything about the macro, not even the name of the macro.
The first line is a call to a macro named ADD_PROJECT_SPECIFICS.
The second line is a conditional branch to a label named STOPPROCESSINGMACRO in the unnamed macro. If you are looking at the full code of this macro look for a line that has STOPPROCESSINGMACRO followed by a colon. That is where it will jump when the macro variable JUMPTOEXIT has a non-zero numeric value.
How do I see this macro program?
Good question. Basically, look in the code above (and code that may have been %INCLUDEd along the way). If the macro is not defined there, you will have to look at the autocall macros. Start by submitting
proc options option=sasautos;run;
and then look in the places listed - some of them may be physical file names (like "c:\somebody\wrote\these\macros"), others can be logical filenames (like SASMACRO or MACROS - they do not have to be capitalized, but they are not in quotes). Then look for the file in these places, beginning with the ones first mentioned - if there are two versions of your macro in different places, then it is the one in the directory mentioned first that will be used.
If you just want to get an idea of what is going on, try setting the options MPRINT, SYMBOLGEN or MLOGIC, these will show a lot about what happened in the log after submitting your macro call.
If the macro is being found via AUTOCALL you could use this macro to help you get a list of currently compiled macros and what filename in the autocall path(s) looks like it might be the source.
https://github.com/sasutils/macros/blob/master/maclist.sas
There are a few SAS options to write more macro info to the SAS log.
MAUTOLOCDISPLAY will write to the SAS log the location from where an Autocall macro has been compiled from. Once you have this path you can look into the macro definition (the code).
And then there are of course also options MPRINT, SYMBOLGEN, MLOGIC and a few others.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.