From: laxxy on
Hi all --

Does anyone know if there is any way to save the current title in a
macro variable?

eg. to allow smth like this:

%macro printsomething(x);
%let oldtitle=&currenttitle;
title "&x";
* ... print something... ;
title "&oldtitle";
%mend;

Thanks!!
From: Tom Abernathy on
On Mar 27, 3:13 pm, laxxy <laxyf...(a)gmail.com> wrote:
> Hi all --
>
> Does anyone know if there is any way to save the current title in a
> macro variable?
>
> eg. to allow smth like this:
>
> %macro printsomething(x);
>   %let oldtitle=&currenttitle;
>   title "&x";
>   * ... print something... ;
>   title "&oldtitle";
> %mend;
>
> Thanks!!

proc sql noprint;
select trim(text) into :title1-:title10
from dictionary.titles where type='T'
;
quit;

You can also use the view SASHELP.VTITLE if you do not want to use
PROC SQL.