<?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: how to eliminate the effect of system options? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286216#M58668</link>
    <description>OK， Thank you.</description>
    <pubDate>Thu, 21 Jul 2016 18:48:47 GMT</pubDate>
    <dc:creator>RavenWu</dc:creator>
    <dc:date>2016-07-21T18:48:47Z</dc:date>
    <item>
      <title>how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285951#M58570</link>
      <description>&lt;P&gt;My first quesion:&lt;/P&gt;&lt;P&gt;After I imported the datafile, I wrote&lt;/P&gt;&lt;PRE&gt;PROC IMPORT DATAFILE= 'D:\sasprogramming\EX1.xls' OUT= EX1&lt;BR /&gt;DBMS=xls REPLACE ;&lt;BR /&gt;GETNAMES= yes;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;options FIRSTOBS =2;&lt;/PRE&gt;&lt;P&gt;then the output data will read the data&amp;nbsp;from the third&amp;nbsp;row, but even if I delete this statement&amp;nbsp;(OPTION FIRSTOBS=2), and re-run the import statement, the SAS&amp;nbsp;will still read the datafile from the third&amp;nbsp;row, then how could I eliminate the effet of the option statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;My data looks like:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4145i07ECFCEFA5048AB4/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="2016-07-20_212008.png" title="2016-07-20_212008.png" /&gt;&lt;/P&gt;&lt;P&gt;the variables are in the second row, If I use the following codes:&lt;/P&gt;&lt;PRE&gt;PROC IMPORT DATAFILE= 'D:\sasprogramming\EX1.xls' OUT= EX1
DBMS=xls REPLACE ;
GETNAMES= yes;
RUN;&lt;/PRE&gt;&lt;P&gt;the headline of the output will be A B C D..., Apprently SAS threat the A B C D as the variables. then if I add&lt;/P&gt;&lt;PRE&gt;options FIRSTOBS =2;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;SAS will read the data from the third line, then the variables id, dates....will disappear, so if I want to read the second row as my varibles, what I can do?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 19:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285951#M58570</guid>
      <dc:creator>RavenWu</dc:creator>
      <dc:date>2016-07-20T19:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285956#M58572</link>
      <description>&lt;P&gt;In your case you can revert the FIRSTOBS option to its default by&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS FIRSTOBS=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Deleting an OPTIONS statement does not undo its effects unless you restart SAS. Usually this option is used in a more limited scope that in your case so there is less need to worry about the remainder of the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;- Jan.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 20:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285956#M58572</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2016-07-20T20:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285964#M58574</link>
      <description>Thank you for your response, but if I set FIRSTOBS=1, the variables are indeed display in the output, but SAS do not treat them as the variables, instead, SAS still treat variables (id, dates...) as the data contents, and treat the excel column A B C D as the variables, but actually I want to use the variables id, dates..., so how can I do?</description>
      <pubDate>Wed, 20 Jul 2016 20:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285964#M58574</guid>
      <dc:creator>RavenWu</dc:creator>
      <dc:date>2016-07-20T20:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285972#M58576</link>
      <description>&lt;P&gt;Why do you have an XLS file?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the NAMEROW and DATAROW options. For importing data you shouldn't be using system options.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 21:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/285972#M58576</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-20T21:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286017#M58592</link>
      <description>&lt;P&gt;It is RANGE problem. Or you could try other option as Reeza pointed : like&amp;nbsp;&lt;SPAN&gt; DATAROW options, STARTROW options.....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC IMPORT DATAFILE= 'D:\sasprogramming\EX1.xls' OUT= EX1
DBMS=xls REPLACE ;&lt;BR /&gt;RANGE='Sheet1$A1:E100';
GETNAMES= yes;
RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 01:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286017#M58592</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-21T01:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286128#M58633</link>
      <description>&lt;P&gt;Thank you for your answer, but it doesn't work. the &amp;nbsp;SAS still treat A B C D as the variables.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4162i77415B30CAB60348/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="2016-07-21_154453.png" title="2016-07-21_154453.png" /&gt;&lt;/P&gt;&lt;P&gt;I have attached my excel file. Could you try it and find the solution for this? Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 13:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286128#M58633</guid>
      <dc:creator>RavenWu</dc:creator>
      <dc:date>2016-07-21T13:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286132#M58636</link>
      <description>&lt;P&gt;&amp;nbsp;Do you need to do this multiple times? If not, fix the file manually and move on. You can also assign a named range in Excel and use that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, unfortunately with an XLS file your options are very limited.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If XLSX NAMEROW=2; DATAROW=3; will import the file correctly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 13:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286132#M58636</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-21T13:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to eliminate the effect of system options?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286216#M58668</link>
      <description>OK， Thank you.</description>
      <pubDate>Thu, 21 Jul 2016 18:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-eliminate-the-effect-of-system-options/m-p/286216#M58668</guid>
      <dc:creator>RavenWu</dc:creator>
      <dc:date>2016-07-21T18:48:47Z</dc:date>
    </item>
  </channel>
</rss>

