| Date: | Thu, 29 May 2008 15:51:21 -0400 |
| Reply-To: | SAS_learner <proccontents@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | SAS_learner <proccontents@GMAIL.COM> |
| Subject: | Re: how to get a value in between |
|
| In-Reply-To: | <200805291924.m4TH7K84010667@malibu.cc.uga.edu> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Ohh Okay I did not know that scan get you inbetween I used two scans to get
it like this
if Substr(lbstresu,3,1) = "^" then digit = Strip(
Scan(Scan(lbstresu,1,"/"),-1,"^") );
thanks any way Ya for the solution
On Thu, May 29, 2008 at 3:24 PM, Ya Huang <ya.huang@amylin.com> wrote:
> 60 data _null_;
> 61 a="10^12/L";
> 62 mid=input(scan(a,2,'^/'),best.);
> 63 put mid=;
> 64 run;
>
> mid=12
> NOTE: DATA statement used:
>
>
> On Thu, 29 May 2008 15:11:48 -0400, SAS_learner <proccontents@GMAIL.COM>
> wrote:
>
> >hello all ,
> >
> >I have lab units value like these 10^9/L, 10^12/L I am trying to insert
> >{Super in front of the ^ so that it appears the way I want it in the
> Report
> >for that I using Code like this but this is not enough as it is messing up
> >the the 10^12/L
> >
> >if Substr(lbstresu,3,1) = "^"
> > then lbstresu1 = Strip(Substr(lbstresu,1,2)) !!"^{super
> >"!!Strip(Substr(lbstresu,4,1))!!"}" !!Strip(Substr(lbstresu,5)) ; */;
> >
> >if lbstresu1 ^= " " then lbstresu = lbstresu1;
> >
> >Any Idea how to capture the values inbedtween ^ and /L , I do not think I
> >can write too many if conditions using the hard coded values
> >
> >thanks for your time and help
>
|