Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / SAS / October 2008



Tip: Looking for answers? Try searching our database.

SAS/AF help: how to convert SCL list to text string?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bin Sun - 04 Oct 2008 18:33 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.