| Date: | Thu, 2 Aug 2001 07:55:52 -0400 |
| Reply-To: | "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Diskin, Dennis" <Dennis.Diskin@PHARMA.COM> |
| Subject: | Re: simple label &output |
|
| Content-Type: | text/plain |
|---|
Shireen,
1. One way::
data f;
array td(6) p10-p15;
array ph(3) p7-p9;
do i=1 to 6;
if td(i) LT 0 then
do;
output f;
delete;
end;
end;
2. Label works but, you are missing semi-colons on almost all your
statements.:
> -----Original Message-----
> From: shireen p [SMTP:shireenp@HOTMAIL.COM]
> Sent: Wednesday, August 01, 2001 3:33 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: simple label &output
>
> Hello,
> Could some one help me with this simple problem. Any help is much
> appreciated. Thank you.-Shireen
>
> Data a;
> input @1 p1 13. @14 p2 13. @27 p3 13. @40 p4 13. @53 p5 13. @66 p6 13./
> @1 p7 13. @14 p8 13. @27 p9 13. @40 p10 13. @53 p11 13. @66 p12 13./
> @1 p13 13. @14 p14 13. @27 p15 13.;
> cards;
> ..
> ..
>
> ;
>
> data f;
> array td(6) p10-p15;
> array ph(3) p7-p9;
>
> do i=1 to 6;
> if td(i) LT 0 then output f;
> end;
> /*(here I want only one output record if any one of the td(i)is LT 0
> instead
> of multiple records one for each negative variable)*/;
>
> run;
>
> data try;
> set f;
> proc print data=f;
> label p1='lambda11'
> p2='lambda21'
> p3='lambda32'
> p4='lambda42'
> p5='lambda53'
> p6='lambda63'
> p7='phi21'
> p8='phi31'
> p9='phi32'
> p10='delta1'
> p11='delta2'
> p12='delta3'
> p13='delta4'
> p14='delta5'
> p15='delta6';
> run;
> /* why does the labels statement not work */;
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
|