<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Array problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45828#M9484</link>
    <description>Does someone can help me with this?&lt;BR /&gt;
The first example I want to get aqqq 30qqq ageqqq sexqqq , i dont get it !!!!&lt;BR /&gt;
but when im doing it in the oposite way i get what i want.&lt;BR /&gt;
Does someone  Knows whats my problem.&lt;BR /&gt;
&lt;BR /&gt;
/*not working*/&lt;BR /&gt;
data a;&lt;BR /&gt;
input Class $ Age $  Sex $ ;&lt;BR /&gt;
cards;&lt;BR /&gt;
a 30 m y&lt;BR /&gt;
b 60 y n&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data b;&lt;BR /&gt;
set a;&lt;BR /&gt;
array test Class Age  Sex ;&lt;BR /&gt;
do over test;&lt;BR /&gt;
test=test||'qqqqqq';&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/*works well*/&lt;BR /&gt;
&lt;BR /&gt;
data a;&lt;BR /&gt;
input Class $ Age $  Sex $ ;&lt;BR /&gt;
cards;&lt;BR /&gt;
a 30 m y&lt;BR /&gt;
b 60 y n&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data b;&lt;BR /&gt;
set a;&lt;BR /&gt;
array test Class Age  Sex ;&lt;BR /&gt;
do over test;&lt;BR /&gt;
test='qqqqqq'||test;&lt;BR /&gt;
end;&lt;BR /&gt;
run;</description>
    <pubDate>Sun, 14 Sep 2008 06:19:39 GMT</pubDate>
    <dc:creator>yonib</dc:creator>
    <dc:date>2008-09-14T06:19:39Z</dc:date>
    <item>
      <title>Array problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45828#M9484</link>
      <description>Does someone can help me with this?&lt;BR /&gt;
The first example I want to get aqqq 30qqq ageqqq sexqqq , i dont get it !!!!&lt;BR /&gt;
but when im doing it in the oposite way i get what i want.&lt;BR /&gt;
Does someone  Knows whats my problem.&lt;BR /&gt;
&lt;BR /&gt;
/*not working*/&lt;BR /&gt;
data a;&lt;BR /&gt;
input Class $ Age $  Sex $ ;&lt;BR /&gt;
cards;&lt;BR /&gt;
a 30 m y&lt;BR /&gt;
b 60 y n&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data b;&lt;BR /&gt;
set a;&lt;BR /&gt;
array test Class Age  Sex ;&lt;BR /&gt;
do over test;&lt;BR /&gt;
test=test||'qqqqqq';&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
/*works well*/&lt;BR /&gt;
&lt;BR /&gt;
data a;&lt;BR /&gt;
input Class $ Age $  Sex $ ;&lt;BR /&gt;
cards;&lt;BR /&gt;
a 30 m y&lt;BR /&gt;
b 60 y n&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data b;&lt;BR /&gt;
set a;&lt;BR /&gt;
array test Class Age  Sex ;&lt;BR /&gt;
do over test;&lt;BR /&gt;
test='qqqqqq'||test;&lt;BR /&gt;
end;&lt;BR /&gt;
run;</description>
      <pubDate>Sun, 14 Sep 2008 06:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45828#M9484</guid>
      <dc:creator>yonib</dc:creator>
      <dc:date>2008-09-14T06:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45829#M9485</link>
      <description>In your "not working" process, you are attempting to concatenate a data string to the end of a SAS variable.  The concatenation operation does not trim trailing blanks, so your resulting SAS variable (after the array processing) has been truncated.  &lt;BR /&gt;
&lt;BR /&gt;
For what you are trying to accomplish, you must use a function to accomplish the trim, such as CATT (new with SAS 9, or TRIM -- there are others as well).&lt;BR /&gt;
&lt;BR /&gt;
Also, if you were to add a PUT _ALL_ to your DO/END processing after the assignment, you might have some additional diagnostic information to see the execution as it is processing.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sun, 14 Sep 2008 16:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45829#M9485</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-09-14T16:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Array problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45830#M9486</link>
      <description>I got it thanks for your help!!</description>
      <pubDate>Sun, 14 Sep 2008 17:25:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-problem/m-p/45830#M9486</guid>
      <dc:creator>yonib</dc:creator>
      <dc:date>2008-09-14T17:25:39Z</dc:date>
    </item>
  </channel>
</rss>

