| Date: | Wed, 15 Jul 2009 15:15:45 -0400 |
| Reply-To: | msz03@albany.edu |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Mike Zdeb <msz03@ALBANY.EDU> |
| Subject: | Re: Query around label |
| Content-Type: | text/plain;charset=iso-8859-1 |
hi ... since Mary and I posted the same answer, let's try something else ...
data temp;
x='1';
label x ='some label';
call symput('label_x',vlabel(x));
run;
data temp2;
set temp;
y=input(x,1.);
label y = "&label_x";
run;
--
Mike Zdeb
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
> That's a bit trickier than it looks; I got it to work by putting the label on the symbol table but then had to wait until the data step finished to
> be able to use it, thus the proc datasets in the solution rather than just code in the same data set for the label.
>
> data temp;
> x='1';
> label x ='another label';
> run;
>
> data temp2;
> set temp;
> y=input(x,1.);
> call symput('label_x',vlabel(x));
> run;
>
> proc datasets library=work nolist;
> modify temp2;
> label y="&label_x";
> quit;
>
>
> -Mary
>
> --- Rajat.Mathur@DIAMONDCONSULTANTS.COM wrote:
>
> From: "Mathur, Rajat" <Rajat.Mathur@DIAMONDCONSULTANTS.COM>
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Query around label
> Date: Wed, 15 Jul 2009 12:51:00 -0500
>
> Hi
>
> Here is my problem around labels:
>
> data x.temp;
> x='1';
> label x ='some label';
> run;
>
> data x.temp2;
> set x.temp;
> y=input(x,1.);
> run;
>
> Now I need the same label for y as it is for x.
>
> Can anyone help me with this?
>
> Thanks in advance
> -Rajat
>
> ________________________________
> This transmission may (i) be subject to contractual, statutory or other obligations of confidentiality; (ii) contain "protected health information "
> as defined in HIPAA or "non-public personal information " as defined under data privacy laws; or (iii) be otherwise strictly confidential. If you
> are not the intended recipient of this message, you may not disclose, print, copy or disseminate this information. If you have received this in
> error, please reply to the sender only and delete the message. Unauthorized interception of this e-mail is a violation of federal law. Diamond's
> operating subsidiary in North America is Diamond Management & Technology Consultants NA, Inc.; in the U.K. and Europe, Diamond Management &
> Technology Consultants Limited; and in Asia, Diamond Management & Technology Consultants Pvt. Ltd.
>
|