Purpose
cstandard study titles


%macro stitles(title4=,poptitle=,byvars=,run_desc=,tableno=,byvar_prefixs=);
title1 bold j=left 
"&sponname."         j=right "Page ^{pageof} ";
title2 bold j=l
"Protocol No.: &sponprot.(&study)";
title3 bold j=l
"Drug Substance: &drugsubstance";
title4 bold j=l
"&tableno: &title4 " %if %nrbquote(&run_desc) ne %nrbquote() %then %do; "- &run_desc" %end;;
title5 bold j=l
"&poptitle";
%let t6 = %str();
%do i=1 %to %wordcount(list=&byvars);
%if &i ne 1 %then %do;
/* puts the by groups on separate lines in rtf with ^n */
 
%let t6 = &t6 ^n %scan(&byvar_prefixs.,&i.,%str(^))  #byval(byvar&i._c);
%end;
%else %do;
 
%let t6 = &t6 %scan(&byvar_prefixs.,&i.,%str(^))  #byval(byvar&i._c);
%end;
%end;
%if %nrbquote(&t6.) ne %nrbquote() %then %do; title6 bold j=l "&t6";%end;

%mend;