<?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: doubt in using WHERE statement in datastep when reading external data with infile statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492005#M129221</link>
    <description>&lt;P&gt;where= dataset options or where statements are applied to incoming datasets only. When reading from external files, use a subsetting if:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hh;
infile "/folders/myfolders/data/stud_newdata.txt";
input id $ Name $ Subject $ Speciality $ marks;
if speciality='BBA';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Sep 2018 08:00:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-09-03T08:00:00Z</dc:date>
    <item>
      <title>doubt in using WHERE statement in datastep when reading external data with infile statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492002#M129220</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I am using below code when reading external data through infile statement&lt;/P&gt;&lt;PRE&gt;data hh;&lt;BR /&gt;infile "/folders/myfolders/data/stud_newdata.txt";&lt;BR /&gt;input id $ Name $ Subject $ Speciality $ marks;&lt;BR /&gt;where speciality='BBA';&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;i see below error while executing&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: No input data sets available for WHERE statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;does this mean i should not use WHERE statement when using INFILE statement in dataset?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i have worked with WHERE dataset option in the same datastep, it is working but not WHERE statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please let me know if i should not used WHERE statement when reading data through INFILE statement&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 07:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492002#M129220</guid>
      <dc:creator>Swapnas</dc:creator>
      <dc:date>2018-09-03T07:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using WHERE statement in datastep when reading external data with infile statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492005#M129221</link>
      <description>&lt;P&gt;where= dataset options or where statements are applied to incoming datasets only. When reading from external files, use a subsetting if:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hh;
infile "/folders/myfolders/data/stud_newdata.txt";
input id $ Name $ Subject $ Speciality $ marks;
if speciality='BBA';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 08:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492005#M129221</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-03T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: doubt in using WHERE statement in datastep when reading external data with infile statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492006#M129222</link>
      <description>could you please try using the &lt;BR /&gt;&lt;BR /&gt;If statement instead of where statement since we are reading the data from external file.</description>
      <pubDate>Mon, 03 Sep 2018 08:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/doubt-in-using-WHERE-statement-in-datastep-when-reading-external/m-p/492006#M129222</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-09-03T08:04:39Z</dc:date>
    </item>
  </channel>
</rss>

