Date: Wed, 9 Feb 2005 13:58:59 -0500
Reply-To: "Sridhar, Kumar" <nsridhar@MEDAREX.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Sridhar, Kumar" <nsridhar@MEDAREX.COM>
Subject: Question about assigning variables..
Content-Type: text/plain; charset="us-ascii"
Hi There:
Hi All:
Oops, sorry. One of the disadvantages of not bringing my glasses today
is that I can't see what the subject said in my previous email. Anyway,
I have a question in regards to the following code.
data newt;
length cvtid $20. cchem $50.;
merge u1t u2t;
by trtgrpi lbseq lbtest vtid ;
cchem=trim(left(put(lbseq,lbseq12.)))||'
('||trim(left(lbsunit))||')';
cvtid=trim(left(put(vtid,visitnum.)));
if vtid=2 then cvtid="Visit 2 (Baseline)";
run;
In the above code, the variable cchem (which I have defined as being of
length 50) is supposed to take in the numeric variable and apply the
format (lbseq12.) and convert that to a character variable which will
get concatenated to the the variable lbsunit. What is happening is that
the variable cchem comes out with a length of 18 which is not what I
wanted. I am not sure what is wrong or what I am missing here.
Your help would be greatly appreciated.
Thanks and regards
Kumar Sridhar