Date: Fri, 12 Feb 1999 14:59:05 +0000
Reply-To: John Whittington <medisci@POWERNET.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: John Whittington <medisci@POWERNET.COM>
Subject: Re: Q: Loosing FOOTNOTE's
Content-Type: text/plain; charset="us-ascii"
At 09:36 12/02/99 +0100, Wolf F. Lesener wrote:
>I have to do some outputs with PUT statements. The problem I've got is that
>all TITLEs are correct printed but no FOOTNOTE has been output.
Wolf, as others have told you, footnotes are supported only by PROCs, not
DATA steps.
One thing I have occasionally done, when I want to write 'DATA _NULL_'
reporting steps but nevertheless want to retain some of the facilities
(footnotes, pagination management etc.) of PROC print, is to output the
lines of data to a SAS dataset. In other words, each line which would have
looked like:
PUT <whatever> ;
turns into:
x = PUT( <whatever>, $200.) ; output ;
.. (although one has to concatenate together everything one wants output on
a line), so one gets code which looks like:
data forprint (keep = x) ;
length x $ 200 ;
a = 'apple' ; b = 'pear' ; c = 'grape' ;
x = put(a || ' is not the same as ' || b ||' , $200.) ; output ;
x = put(b || ' is not the same as ' || c ||' , $200.) ; output ;
x = put(c || ' is not the same as ' || a ||' , $200.) ; output ;
run ;
proc print data = forprint label noobs ;
label x = '00'x ;
title 'something' ;
footnote 'something' ;
run ;
The need for concatenation can make it a bit tedious, but it is occasionally
worthwhile! there is, of course, also the possibility of putting other
variables in the dataset which can be used to facilitate selective printing
(with WHERE statements or dataset options), printing with BY processing etc.
It can sometimes be simpler to create one 'for printing' dataset like this,
for subsequent selective/whatever printing, than to write multiple DATA
_NULL_ steps.
Regards,
John
----------------------------------------------------------------
Dr John Whittington, Voice: +44 (0) 1296 730225
Mediscience Services Fax: +44 (0) 1296 738893
Twyford Manor, Twyford, E-mail: medisci@powernet.com
Buckingham MK18 4EL, UK mediscience@compuserve.com
----------------------------------------------------------------
|