<?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: Removing blanks when opening files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702834#M215286</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input_data_current;
    set data_file (where = (not missing(id))); 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Dec 2020 16:48:09 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-12-01T16:48:09Z</dc:date>
    <item>
      <title>Removing blanks when opening files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702830#M215282</link>
      <description>&lt;P&gt;Hi there, I am using SAS Enterprise Guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am aware there are ways to keep or drop variables when opening new files. For example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data input_data_current;&lt;/P&gt;&lt;P&gt;set data_file (drop=var1 var2 var3);&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I am aware that I can remove rows with missing IDs but can I remove those rows that are missing IDs when I initially open the file?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702830#M215282</guid>
      <dc:creator>a_zacMD</dc:creator>
      <dc:date>2020-12-01T16:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blanks when opening files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702833#M215285</link>
      <description>&lt;P&gt;Are you looking for something like this?&lt;/P&gt;
&lt;PRE&gt;data want;
   set data_file ; 
   where not missing(id);
run;&lt;/PRE&gt;
&lt;P&gt;Not quite sure what "initially open the file" actually means in your context.&lt;/P&gt;
&lt;P&gt;Most procedures will honor the where statement as well and the few that might not would honor a data set option so you may not need to create a new data set.&lt;/P&gt;
&lt;PRE&gt;Proc print data=somedatesetname;
   where not missing(id);
run;

/* or data set option*/
Proc print data=somedatasetname (where=( not missing(id)));
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702833#M215285</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-01T16:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blanks when opening files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702834#M215286</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input_data_current;
    set data_file (where = (not missing(id))); 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702834#M215286</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-01T16:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blanks when opening files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702835#M215287</link>
      <description>&lt;P&gt;You can use a WHERE statement or data set option to filter your data. A WHERE statement or the data set option filters can be used in almost every proc in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data set option:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input_data_current;
set data_file(drop = var1 var2 var3 where=(not missing(ID)));
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;WHERE statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data input_data_current;
set data_file(drop = var1 var2 var3);

where not missing(ID);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Just a quick comment on terminology "Opening files" could be interpreted in several different ways so it's a very ambiguous term.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/334359"&gt;@a_zacMD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi there, I am using SAS Enterprise Guide.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am aware there are ways to keep or drop variables when opening new files. For example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data input_data_current;&lt;/P&gt;
&lt;P&gt;set data_file (drop=var1 var2 var3);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I am aware that I can remove rows with missing IDs but can I remove those rows that are missing IDs when I initially open the file?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Removing-blanks-when-opening-files/m-p/702835#M215287</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-12-01T16:50:31Z</dc:date>
    </item>
  </channel>
</rss>

