<?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: Can you help me on the SAS code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112008#M259044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Helen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This question has been asked before.&amp;nbsp; Go to the main SAS Communities page&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="2007" __jive_macro_name="community" class="jive_macro jive_macro_community" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and search for &lt;/P&gt;&lt;P&gt;import directory&lt;/P&gt;&lt;P&gt;You'll find an number of approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this particular forum is intended for help with the forum itself.&amp;nbsp; Your future posts might get more answers if they are in the data step or procedures forums (depending on the question).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2013 02:18:33 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2013-02-19T02:18:33Z</dc:date>
    <item>
      <title>Can you help me on the SAS code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112005#M259041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I encounter some difficulties in processing a bunch of data. I would like to import all files in the folder into SAS. Could anyone help me on this. I have attached four files: the first three files are examples I have to import and the last file is the report I would like to generate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some steps I have to do:&lt;/P&gt;&lt;P&gt;1. Only include information of Institutional Ownership, starting from the observation 30th.&lt;/P&gt;&lt;P&gt;=&amp;gt; I think of using FIRSTOBS function in PROC IMPORT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the last paragraph (after institutional ownership) should be excluded&lt;/P&gt;&lt;P&gt;=&amp;gt; I think of using MISSING function of more than two cells then delete&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Need to rename all the variable =&amp;gt; since when importing in SAS, it will automatically changes the name to VAR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. To create the PERIOD column in the FINAL_RESULT&lt;/P&gt;&lt;P&gt;=&amp;gt; I use the PROC TRANSPOSE =&amp;gt; need to reformat the DATE in&amp;nbsp; POSITION column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Create the COMPANY NAME =&amp;gt; don't have any idea yet on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on this? Any suggestion is greatly appreciated! Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Helen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 02:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112005#M259041</guid>
      <dc:creator>huongtruong</dc:creator>
      <dc:date>2013-02-18T02:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me on the SAS code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112006#M259042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is some code to get all the excel filenames in a folder in a dataset. The readin might be a little different depending on whether this is a one time task or has to be repeated over and over again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data xlsx_file ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length file_name $200 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = filename("dir","FOLDER PATH HERE");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d = dopen("dir");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n = dnum(d);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to n;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file_name = dread(d,i);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if lowcase(scan(file_name,2,'.')) = 'xls' then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 16:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112006#M259042</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-02-18T16:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me on the SAS code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112007#M259043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Esjackso1,&lt;/P&gt;&lt;P&gt;Do you know how to import all the files (in the same folder) to SAS, rather than import individually?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Helen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 02:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112007#M259043</guid>
      <dc:creator>huongtruong</dc:creator>
      <dc:date>2013-02-19T02:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me on the SAS code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112008#M259044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Helen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This question has been asked before.&amp;nbsp; Go to the main SAS Communities page&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="2007" __jive_macro_name="community" class="jive_macro jive_macro_community" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and search for &lt;/P&gt;&lt;P&gt;import directory&lt;/P&gt;&lt;P&gt;You'll find an number of approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this particular forum is intended for help with the forum itself.&amp;nbsp; Your future posts might get more answers if they are in the data step or procedures forums (depending on the question).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;P&gt;Duke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 02:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-you-help-me-on-the-SAS-code/m-p/112008#M259044</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2013-02-19T02:18:33Z</dc:date>
    </item>
  </channel>
</rss>

