<?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: Arrays in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364112#M2657</link>
    <description>&lt;P&gt;I merged the threads.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jun 2017 11:49:55 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-04T11:49:55Z</dc:date>
    <item>
      <title>Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364040#M2643</link>
      <description>&lt;P&gt;Plese help me to ave solution of the following problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Write a shorter query using SAS arrays to replace '0's as missing values in “Online Orders.csv” dataset. Use asterix(*).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2017 21:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364040#M2643</guid>
      <dc:creator>NVN</dc:creator>
      <dc:date>2017-06-03T21:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364045#M2647</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147075"&gt;@NVN&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Plese help me to ave solution of the following problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write a shorter query using SAS arrays to replace '0's as missing values in “Online Orders.csv” dataset. Use asterix(*).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sounds like homework. How about you post what you've tried and we can help with any issues you have.&lt;/P&gt;
&lt;P&gt;Here's a tutorial that may be helpful and probably really has the answer you need:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2017 22:06:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364045#M2647</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-03T22:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364103#M2651</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Write a shorter query using SAS arrays to replace '0's as missing values in “Online Orders.csv” dataset. Use asterix(*).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I executed the following &amp;nbsp;code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Data online;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set online;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;array miss_val=_all_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if miss_val=0 then miss_val="*";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am using &amp;nbsp;virtual lab facility for sas. &amp;nbsp;So &amp;nbsp;when i execute this query the Error that am seeing is "Unfortunately your server has terminated."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when i &amp;nbsp;use " _numeric_ " &amp;nbsp; &amp;nbsp;insted of &amp;nbsp; " _all_ " &amp;nbsp;the following error is displaying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR : &amp;nbsp;Array subscript . out of range [1- 6] of dimension 1 of array miss_val at line 100 and column 4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when i &amp;nbsp;use " _character_ " &amp;nbsp; &amp;nbsp;insted of &amp;nbsp; " _all_ " &amp;nbsp;the following error is displaying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR : &amp;nbsp;Array subscript . out of range [1- 14] of dimension 1 of array miss_val at line 110 and column 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 08:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364103#M2651</guid>
      <dc:creator>NVN</dc:creator>
      <dc:date>2017-06-04T08:10:43Z</dc:date>
    </item>
    <item>
      <title>Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364106#M2655</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Write a shorter query using SAS arrays to replace '0's as missing values in “Online Orders.csv” dataset. Use asterix(*).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I executed the following &amp;nbsp;code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Data online;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;set online;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;array miss_val=_all_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if miss_val=0 then miss_val="*";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Am using &amp;nbsp;virtual lab facility for sas. &amp;nbsp;So &amp;nbsp;when i execute this query the Error that am seeing is "Unfortunately your server has terminated."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when i &amp;nbsp;use " _numeric_ " &amp;nbsp; &amp;nbsp;insted of &amp;nbsp; " _all_ " &amp;nbsp;the following error is displaying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR : &amp;nbsp;Array subscript . out of range [1- 6] of dimension 1 of array miss_val at line 100 and column 4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;when i &amp;nbsp;use " _character_ " &amp;nbsp; &amp;nbsp;insted of &amp;nbsp; " _all_ " &amp;nbsp;the following error is displaying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR : &amp;nbsp;Array subscript . out of range [1- 14] of dimension 1 of array miss_val at line 110 and column &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 09:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364106#M2655</guid>
      <dc:creator>NVN</dc:creator>
      <dc:date>2017-06-04T09:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364108#M2656</link>
      <description>&lt;P&gt;There's no need for multiple threads on the same topic with the exact same question. Let's continue the discussion in your other thread. &lt;A href="https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364040#M2643" target="_blank"&gt;https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364040#M2643&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 10:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364108#M2656</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-06-04T10:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364109#M2654</link>
      <description>&lt;P&gt;Please take a look at the documentation for the ARRAY statement. At least then you will know the proper syntax for your array statement. &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000201956.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000201956.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that documentation, please see Example 5, it is similar to what you want to do.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 10:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364109#M2654</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-06-04T10:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364112#M2657</link>
      <description>&lt;P&gt;I merged the threads.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 11:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364112#M2657</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-04T11:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364132#M2658</link>
      <description>&lt;P&gt;1. How do you declare an array - your declaration is incorrect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. You're going to need to lop through the array but you have no loop&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The asterisks comment is in reference to declaring an array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Heres a start for you. Review the link I included above. The first example is almost exactly your question.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data want;

Set have;

Array nums (*) _numeric_;

*loop start goes here;

* change to 0 goes here;

*loop end goes here;

Run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Jun 2017 16:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Arrays/m-p/364132#M2658</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-04T16:20:27Z</dc:date>
    </item>
  </channel>
</rss>

