LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 24 Jan 2006 14:59:15 -0700
Reply-To:   "Barz, Ken" <Ken.Barz@INTRADO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Barz, Ken" <Ken.Barz@INTRADO.COM>
Subject:   Conditional Output in SAS/Intrnet
Content-Type:   text/plain; charset="us-ascii"

I'd like to write a datastep that will output a report when it has data, but will output an empty table with an explanatory statement if the processing comes up empty.

data _null_;

set spell end=last nobs=sp_obs;

file _webout;

if sp_obs > 0 then do;

* Code to generate html report here *;

end;

else do;

* Code to generate html with no data message here *;

end;

run;

This works if there is data in spell. However, it looks like if there is no data in spell, then sp_obs must not get created and thus the test fails. Is there some way to force the issue here?

Thanks

Ken Barz

Software Engineer

Intrado Metrics

Intrado Inc.

1601 Dry Creek Drive

Longmont, CO 80503

direct: 720.494.5868

pager: 303-581-7667

fax: 720.494.6600

email: ken.barz@intrado.com

Intrado.(r)

www.intrado.com <file:///C:\Documents%20and%20Settings\kbarz\Application%20Data\Microsof t\Signatures\www.intrado.com>

ATTENTION:

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify Intrado Inc. immediately at 720.494.5800 and destroy all copies of this message and any attachments.


Back to: Top of message | Previous page | Main SAS-L page