Hello,
I am using a proc http procedure to send information to an API Web Site. During the SAS code execution, one macro variable name ex; ContactId&i is generated as well as its value. For 5000 contacts, I will have something like ContactId1 - ContactId5000 and their corresponding string value.
I do not want to keep the log file because they are too big. So, I wonder how to gather the macro variable name and value into a dataset where each iteration create a new macro variable and how to update the dataset.
Consider adding an append before your drop the result data set.
proc append base=results data=results&i force;
run;
SAS is automatically doing this for you. Take a look at (and copy from if you so choose) dictionary.macros.
@alepage wrote:
Could you please provide a SAS snippet code that show how to do that
proc sql; select * from dictionary.macros ; run;
Will send all of the macro variable information to the result window.
Obviously could create a data set using the Create table <name you want> as syntax.
Could also filter with a Where name is like condition.
Consider adding an append before your drop the result data set.
proc append base=results data=results&i force;
run;
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.