From: Francogrex on 27 Dec 2009 10:15 How can I get sas to automatically convert an array of integers or doubles (like the one below): array arr(5) (4 7 12 5 98); into a string (like the one below): str="4 7 12 5 98";
From: Arthur Tabachneck on 27 Dec 2009 10:54 Franco, One way would be to use the catx function. E.g.,: data want; array arr(5) (4 7 12 5 98); str=catx(' ',of arr:); run; HTH, Art --------------- On Dec 27, 10:15 am, Francogrex <fra...(a)grex.org> wrote: > How can I get sas to automatically convert an array of integers or > doubles (like the one below): > array arr(5) (4 7 12 5 98); > into a string (like the one below): > str="4 7 12 5 98";
From: Arthur Tabachneck on 27 Dec 2009 17:21 Franco, While my suggested code will work, a more correct way of writing it would be: str=catx(' ',of arr[*]); HTH, Art ------- On Sun, 27 Dec 2009 07:54:59 -0800, Arthur Tabachneck <art297(a)NETSCAPE.NET> wrote: >Franco, > >One way would be to use the catx function. E.g.,: > >data want; > array arr(5) (4 7 12 5 98); > str=catx(' ',of arr:); >run; > >HTH, >Art >--------------- >On Dec 27, 10:15 am, Francogrex <fra...(a)grex.org> wrote: >> How can I get sas to automatically convert an array of integers or >> doubles (like the one below): >> array arr(5) (4 7 12 5 98); >> into a string (like the one below): >> str="4 7 12 5 98";
|
Pages: 1 Prev: SAS run via a web browser - Legal issues Next: Dynamic path reader, |