BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

Hi guys, I am doing lesson 6 of the Programming 1 course, here I have to create a macro that stores the file path to export destination folder.

Ben_in_Canberra_0-1666040366689.png

however the macro disappears every time I reset my SAS studio session, is there a make the macro permanent?

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

First thing.  That code is not creating a macro.  It is creating a macro variable (also called a symbol).  A macro is defined by the %MACRO statement.

 

The answer is NO.  There is no such thing.

 

But you can create an autoexec.sas file that runs every time you start a new SAS session.  So you could put code in there that creates the macro variable or does anything else you want to happen every time you start SAS.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

First thing.  That code is not creating a macro.  It is creating a macro variable (also called a symbol).  A macro is defined by the %MACRO statement.

 

The answer is NO.  There is no such thing.

 

But you can create an autoexec.sas file that runs every time you start a new SAS session.  So you could put code in there that creates the macro variable or does anything else you want to happen every time you start SAS.

Nietzsche
Lapis Lazuli | Level 10

thank you, I will look into autoexec.sas and thanks for the clarification on the terminology.

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 909 views
  • 2 likes
  • 2 in conversation