Date: Tue, 11 Mar 2008 10:52:40 -0400
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: macro problem
On Tue, 11 Mar 2008 07:16:14 -0700, adityasikka82@gmail.com
<adityasikka82@GMAIL.COM> wrote:
>Hi,
>
>I am using the following macro
>
>%macro report(study);
>%let module=dm as cg cm;
>*%let i=1;
>%do i=1 %to 4;
>
>%let domain=%scan(&module,&i," ");
>
>options nodate nonumber;
>options orientation=landscape;
>ods listing close;
>ods rtf file = "xyz\consolidate.rtf" ;
>
>proc report data=lib6.&domain NOWINDOWS box missing ;
> title 'Study 85;
> title2 "Data definition file of %upcase(&domain)";
>
> column name type label format length origin comments;
> define name / order order=data 'Name' ;
> define label / order order=data 'Label' ;
> define type / order order=data center 'Type' ;
> define format / order order= data 'Format' ;
> define length / order order=data center 'Length';
> define comments / order order=data 'Comments';
>
>
>%end;
> quit;
>run;
>
>
> ods rtf close;
> ods listing;
>
> %mend report;
> %report(study85)
>
>Now the problem i am facing is that, Log is giving no errors and all
>four variables dm as cg cm are resolved but in the pdf output is only
>showing last 2 files ( cg and cm) and not all the files although macro
>is resoling all 4 variables.
>
>Please guide.
>Thanks
You seem to have more than one problem:
one quote is unclosed:
title 'Study 85;
Why don't you use
title "&study"; ?
2.: your ODS start-statements are IN the loop. They should come before the
loop starts.
Try that...
Gerhard
|