Dear all,
I'm trying to input a matrix using Text pad and need convert the
entered values into a string. For example:
Let the user enter following text into the text pad:
21 12 10 8 8,
12 27 17 15 14,
10 17 35 23 21,
8 15 23 35 25,
8 14 21 25 36
and I want to use the entry as one macro parameter, i.e. same as using:
%let STR = "21 12 10 8 8, 12 27 17 15 14, 10 17 35 23 21, 8 15 23
35 25, 8 14 21 25 36" ;
I know the Text pad return a SCL list and I need somehow convert this
list to a string but can't figure out how.
This is my first SAS/AF project, please help!
Thanks.
Bin
Richard A. DeVenezia - 06 Oct 2008 13:36 GMT
> Dear all,
>
[quoted text clipped - 17 lines]
> list to a string but can't figure out how.
> This is my first SAS/AF project, please help!
declare list myList = {'line 1', 'line 2', 'line 3'};
text = '';
sep = ',';
do i = 1 to listlen(myList);
text = catx(sep, text, getitemc(myList,i));
end;
put text=;
--
Richard A. DeVenezia
http://www.devenezia.com