<?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: subsetting 'read all into' in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112077#M259080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dataset options go inside of parenthesis right after the dataset name.&lt;/P&gt;&lt;P&gt;Replace reference to &lt;SPAN style="font-family: 'courier new', courier;"&gt;Beetles&lt;/SPAN&gt; with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;Beetles ( where= ( type=0 ) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 00:09:21 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-02-18T00:09:21Z</dc:date>
    <item>
      <title>subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112075#M259078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have the code below. However, I'd only like X to contain observations where type=0. When I put a 'where' conditional on my 'use' statement, I get the error: No data set is currently open for input. Here's the code for that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename myfile 'T5_5_FBEETLES.dat';&lt;/P&gt;&lt;P&gt;data Beetles;&lt;/P&gt;&lt;P&gt;infile myfile;&lt;/P&gt;&lt;P&gt;input num type x1 x2 x3 x4;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;use Beetles&amp;nbsp; where type=0;&lt;/P&gt;&lt;P&gt;read all var{x1 x2 x3 x4} into X;&lt;/P&gt;&lt;P&gt;print X;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error: No data set is currently open for input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried adding the 'where' on the 'read all' statement, but I get the error on 'type': Expecting a (. Here's the code for that:&lt;/P&gt;&lt;P&gt;dm "out; clear; log; clear";&lt;/P&gt;&lt;P&gt;filename myfile 'T5_5_FBEETLES.dat';&lt;/P&gt;&lt;P&gt;data Beetles;&lt;/P&gt;&lt;P&gt;infile myfile;&lt;/P&gt;&lt;P&gt;input num type x1 x2 x3 x4;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;use Beetles;&lt;/P&gt;&lt;P&gt;read all var{x1 x2 x3 x4} into X where type=0;&lt;/P&gt;&lt;P&gt;print X;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;Error: Expecting a (.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[just edited my post so that it's more clear]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: egg man&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 21:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112075#M259078</guid>
      <dc:creator>eggman2001</dc:creator>
      <dc:date>2013-02-17T21:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112076#M259079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can include a where dataset option with your 'use' statement.&amp;nbsp; You didn't include anything in your code showing a where clause, or the syntax error, thus I'm not sure what you tried.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 22:33:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112076#M259079</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-17T22:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112077#M259080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dataset options go inside of parenthesis right after the dataset name.&lt;/P&gt;&lt;P&gt;Replace reference to &lt;SPAN style="font-family: 'courier new', courier;"&gt;Beetles&lt;/SPAN&gt; with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;Beetles ( where= ( type=0 ) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 00:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112077#M259080</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-18T00:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112078#M259081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried that but I'm getting the error: Matrix X has not been set to a value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dm "out; clear; log; clear";&lt;/P&gt;&lt;P&gt;filename myfile 'T5_5_FBEETLES.dat';&lt;/P&gt;&lt;P&gt;data Beetles;&lt;/P&gt;&lt;P&gt;infile myfile;&lt;/P&gt;&lt;P&gt;input num type x1 x2 x3 x4;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;use Beetles (where= (type=0));&lt;/P&gt;&lt;P&gt;read all var{x1 x2 x3 x4} into X;&lt;/P&gt;&lt;P&gt;print X;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 00:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112078#M259081</guid>
      <dc:creator>eggman2001</dc:creator>
      <dc:date>2013-02-18T00:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112079#M259082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works for me. IML doesn't like the RUN statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data Beetles;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;input num type x1 x2 x3 x4;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;5 0 1 2 3 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;6 1 2 3 4 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;proc iml;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; use Beetles (where= (type=0)) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; read all var{x1 x2 x3 x4} into X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; print X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 01:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112079#M259082</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-18T01:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: subsetting 'read all into'</title>
      <link>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112080#M259083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem was that I didn't have any observations of type=0. I thought it was a 0 or 1 variable but was a 1 or 2. Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 01:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/subsetting-read-all-into/m-p/112080#M259083</guid>
      <dc:creator>eggman2001</dc:creator>
      <dc:date>2013-02-18T01:15:48Z</dc:date>
    </item>
  </channel>
</rss>

