04-02-2012 09:41 AM
I am Using the following code..
select mail into : email separated by ' " " ' from dump;
filename report email from ="$$$$$$$$$@*******.com"
My Question is ,instead of running the SQL Query Every time,I want to store that Email macro Variable permanently..
So ,Is there any way to store the macro variable permanently??
04-02-2012 09:48 AM
I've never heard of permanently storing a macro variable, but you could always wrap the code within a SAS macro (that you can store permanently), and then just call the macro whenever it is needed. That would probably be a better choice, anyhow, as the email base is likely to change over time.
04-02-2012 10:15 AM
Or you could store it into a permanent text file, and put it back to a macro variable when needed:
infile "h:\email.txt" truncover;
input email $char50.;
if _n_=1 then call symputx('email_new',email);
04-02-2012 10:21 AM
It's already stored in a temporary data set. You just need to retrieve it:
create table perm.macrovar as select * from dictionary.macros where name='MY_MACRO_VARIABLE';
However, if you are dealing with long values, dictionary.macros breaks up your variable into 200-character blocks which will need to be reassembled later.