Date: Wed, 29 Feb 2012 09:20:42 -0500
Reply-To: Jim Groeneveld <jim.1stat@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim.1stat@YAHOO.COM>
Subject: Re: Display no observations
Hi SAS Quest,
I don't entirely understand what you want.
But if what you want is (a page with) an appropriate message
when an analysis dataset is empty (no observations, any variables)
where you would otherwise have no (table) output at all
(e.g. from PROC REPORT) you may use my macro N0cases.sas from
Call the macro (specifying the right parameters)
at the same location(s) as your output table procedure(s).
Then you'l always get one piece of output,
either your table if the dataset is not empty
or a message about the empty dataset (that you may define).
The advantage is that all TITLEs and FOOTNOTEs remain active
and are contained in the output as well.
So you can see which analysis did not produce statistical output.
Regards - Jim.
Jim Groeneveld, Netherlands
On Fri, 24 Feb 2012 09:58:26 -0500, sas quest <sasquest@GMAIL.COM> wrote:
>I want to assign a value to a variable as "No observations" from an
>empty dataset that changes its variables each time it is run. The
>dataset is inside a complex macro.
> I know many ways to create it and display it but inside the macro i
>find it difficult................
>i need something like this:
>/*code needed here to create var*/
>The above macro variable "var" should be chosen from the datset xyz
>which changes its variable names dynamically.
>Thanks in advance