<?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 Re: What is wrong with this? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23629#M3925</link>
    <description>ArtC's point is fundamental to learning SAS programming. Data processing like iterative DO loops is central to the purpose and capabilities of DATA steps. &lt;BR /&gt;
It is possible you want subscripting to select fom a list. That functionality is a typical activity used in an iteration. SAS provides that in DATA steps with ARRAY handling. Not with ampersand. &lt;BR /&gt;
To learn the basics of SAS programming read and try the examples in Documentation. &lt;BR /&gt;
 &lt;BR /&gt;
welcome to SAS&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
    <pubDate>Sat, 30 Oct 2010 07:36:39 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2010-10-30T07:36:39Z</dc:date>
    <item>
      <title>What is wrong with this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23626#M3922</link>
      <description>do i=1 to i&amp;lt;=14;&lt;BR /&gt;
x=i;&lt;BR /&gt;
call symput('j',x);&lt;BR /&gt;
if &lt;BR /&gt;
/*blablablabla*/&lt;BR /&gt;
then Exp&amp;amp;j=Price;&lt;BR /&gt;
&lt;BR /&gt;
i=i+1;&lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
I get the error message:&lt;BR /&gt;
(for the Exp&amp;amp;j=Price statement I have used.)&lt;BR /&gt;
ERROR 180-322: Statement is not valid or it is used out of proper order.</description>
      <pubDate>Wed, 27 Oct 2010 12:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23626#M3922</guid>
      <dc:creator>nidhi123</dc:creator>
      <dc:date>2010-10-27T12:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23627#M3923</link>
      <description>&amp;gt; do i=1 to i&amp;lt;=14;&lt;BR /&gt;
&amp;gt; x=i;&lt;BR /&gt;
&amp;gt; call symput('j',x);&lt;BR /&gt;
&amp;gt; if &lt;BR /&gt;
&amp;gt; /*blablablabla*/&lt;BR /&gt;
&amp;gt; then Exp&amp;amp;j=Price;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; i=i+1;&lt;BR /&gt;
&amp;gt; end;&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I get the error message:&lt;BR /&gt;
&amp;gt; (for the Exp&amp;amp;j=Price statement I have used.)&lt;BR /&gt;
&amp;gt; ERROR 180-322: Statement is not valid or it is used&lt;BR /&gt;
&amp;gt; out of proper order.&lt;BR /&gt;
&lt;BR /&gt;
apart from anything else, you don't know how to use macro variables in a data step&lt;BR /&gt;
&amp;gt; call symput('j',x);&lt;BR /&gt;
&amp;gt; if &lt;BR /&gt;
&amp;gt; /*blablablabla*/&lt;BR /&gt;
&amp;gt; then Exp&amp;amp;j=Price;&lt;BR /&gt;
&lt;BR /&gt;
&amp;amp;j gets the compile-time value, not the run time value&lt;BR /&gt;
Until you appreciate this, avoid call symput()</description>
      <pubDate>Fri, 29 Oct 2010 22:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23627#M3923</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-10-29T22:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23628#M3924</link>
      <description>You will also want to look at the form of the iterative DO statement.  I doubt that this one will do what you intend.&lt;BR /&gt;
&lt;BR /&gt;
 do i=1 to i le 14;&lt;BR /&gt;
&lt;BR /&gt;
Art</description>
      <pubDate>Sat, 30 Oct 2010 03:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23628#M3924</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-10-30T03:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23629#M3925</link>
      <description>ArtC's point is fundamental to learning SAS programming. Data processing like iterative DO loops is central to the purpose and capabilities of DATA steps. &lt;BR /&gt;
It is possible you want subscripting to select fom a list. That functionality is a typical activity used in an iteration. SAS provides that in DATA steps with ARRAY handling. Not with ampersand. &lt;BR /&gt;
To learn the basics of SAS programming read and try the examples in Documentation. &lt;BR /&gt;
 &lt;BR /&gt;
welcome to SAS&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Sat, 30 Oct 2010 07:36:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-wrong-with-this/m-p/23629#M3925</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2010-10-30T07:36:39Z</dc:date>
    </item>
  </channel>
</rss>

