Prev: ? countw
Next: HP Unix Admin -- AZ
From: ap on 7 May 2010 13:57 I need to concatenate few numeric values into one character variable. One way to do is create char copies of the int variables, concatenate them and then drop the char copies. Is there any other better way to typecast and use the variables. I am creating a gene string for implementing genetic algo. So, this stuff needs to be done in every iteration; and number of iterations could be in 000s. Creating and dropping again and again is something i would not prefer doing. Can anyone help???
From: Yi on 7 May 2010 14:17 On May 7, 10:57 am, ap <i.am.adityaprak...(a)gmail.com> wrote: > I need to concatenate few numeric values into one character variable. > One way to do is create char copies of the int variables, concatenate > them and then drop the char copies. Is there any other better way to > typecast and use the variables. I am creating a gene string for > implementing genetic algo. So, this stuff needs to be done in every > iteration; and number of iterations could be in 000s. Creating and > dropping again and again is something i would not prefer doing. > > Can anyone help??? Are you talking about this? data tt; a=1; b=2; c=3; abc=cats(a,b,c); put abc=; run;
From: ap on 7 May 2010 16:54 On May 7, 11:17 pm, Yi <eiwench...(a)hotmail.com> wrote: > On May 7, 10:57 am, ap <i.am.adityaprak...(a)gmail.com> wrote: > > > I need to concatenate few numeric values into one character variable. > > One way to do is create char copies of the int variables, concatenate > > them and then drop the char copies. Is there any other better way to > > typecast and use the variables. I am creating a gene string for > > implementing genetic algo. So, this stuff needs to be done in every > > iteration; and number of iterations could be in 000s. Creating and > > dropping again and again is something i would not prefer doing. > > > Can anyone help??? > > Are you talking about this? > > data tt; > a=1; > b=2; > c=3; > abc=cats(a,b,c); > put abc=; > > run; thanks :) am new to SAS...to some trivial questions :)
From: shiling99 on 16 May 2010 16:54 On May 7, 2:17 pm, Yi <eiwench...(a)hotmail.com> wrote: > On May 7, 10:57 am, ap <i.am.adityaprak...(a)gmail.com> wrote: > > > I need to concatenate few numeric values into one character variable. > > One way to do is create char copies of the int variables, concatenate > > them and then drop the char copies. Is there any other better way to > > typecast and use the variables. I am creating a gene string for > > implementing genetic algo. So, this stuff needs to be done in every > > iteration; and number of iterations could be in 000s. Creating and > > dropping again and again is something i would not prefer doing. > > > Can anyone help??? > > Are you talking about this? > > data tt; > a=1; > b=2; > c=3; > abc=cats(a,b,c); > put abc=; > > run; Usually I define a variable length for any variable derived from cats, scan, because SAS use $200 for the variable. Most time it is too big.
From: pchoate on 18 May 2010 00:35 page 51 here ... https://docs.google.com/viewer?url=http://support.sas.com/publishing/pubcat/chaps/59343.pdf hth - PC On May 16, 1:54 pm, shilin...(a)yahoo.com wrote: > On May 7, 2:17 pm, Yi <eiwench...(a)hotmail.com> wrote: > > > > > > > On May 7, 10:57 am, ap <i.am.adityaprak...(a)gmail.com> wrote: > > > > I need to concatenate few numeric values into one character variable. > > > One way to do is create char copies of the int variables, concatenate > > > them and then drop the char copies. Is there any other better way to > > > typecast and use the variables. I am creating a gene string for > > > implementing genetic algo. So, this stuff needs to be done in every > > > iteration; and number of iterations could be in 000s. Creating and > > > dropping again and again is something i would not prefer doing. > > > > Can anyone help??? > > > Are you talking about this? > > > data tt; > > a=1; > > b=2; > > c=3; > > abc=cats(a,b,c); > > put abc=; > > > run; > > Usually I define a variable length for any variable derived from cats, > scan, because SAS use $200 for the variable. Most time it is too big.
|
Pages: 1 Prev: ? countw Next: HP Unix Admin -- AZ |