<?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: proc import(for numerous variables) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340339#M63237</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130799"&gt;@okyk_86&lt;/a&gt; wrote:&lt;BR /&gt;If I could change my variable names( permno1 to permno1,500), is there any way to use macro?&lt;BR /&gt;Or how about use variable orders(ex: var1 var2 var3...var1500)? T_T&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Absolutely. Variable names like that lend themselves to all kinds of easier code.&lt;/P&gt;
&lt;P&gt;You can then even use them in lists:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format var1-var1500 10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So it depends on the attributes of the columns. If they're all numeric, the data step can be extremely simple to write, and you won't even have problems with overlong statements (a single SAS statement must not exceed 32767 characters in length).&lt;/P&gt;
&lt;P&gt;If you have groups of variables with different attributes, using macro preprocessing will be the method of choice.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2017 09:17:05 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-13T09:17:05Z</dc:date>
    <item>
      <title>proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340310#M63232</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm trying to import xlsx.files but all of the variables doesn't being imported.&lt;/P&gt;&lt;P&gt;My variables are about 1,500 .&lt;/P&gt;&lt;P&gt;I have several excel files that have to import so &amp;nbsp;want to use macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I import this file using macro?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code:&lt;/P&gt;&lt;P&gt;proc import out = work.data1&lt;/P&gt;&lt;P&gt;datafile = 'C:\sw\desktop\data1.xlsx'&lt;/P&gt;&lt;P&gt;dbms=xlsx replace;&lt;/P&gt;&lt;P&gt;sheet=sheet1;&lt;/P&gt;&lt;P&gt;getnames=yes;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data:&lt;/P&gt;&lt;P&gt;date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;APPLE &amp;nbsp; &amp;nbsp; AT&amp;amp;T &amp;nbsp; CB ... MS ...&lt;/P&gt;&lt;P&gt;01.01 2000 &amp;nbsp; &amp;nbsp;1.2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.3 &amp;nbsp; &amp;nbsp; 1.2 ... 4.2 ...&lt;/P&gt;&lt;P&gt;02.01 2000 &amp;nbsp; &amp;nbsp;1.3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.5 &amp;nbsp; &amp;nbsp; 1.7 ... 3.2 ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help is truly appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340310#M63232</guid>
      <dc:creator>okyk_86</dc:creator>
      <dc:date>2017-03-14T15:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340311#M63233</link>
      <description>&lt;P&gt;DBMS=XLSX&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 06:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340311#M63233</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-13T06:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340313#M63234</link>
      <description>&lt;P&gt;ok. I revised it ^^;;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 07:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340313#M63234</guid>
      <dc:creator>okyk_86</dc:creator>
      <dc:date>2017-03-13T07:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340319#M63235</link>
      <description>&lt;P&gt;Save to csv and write a data step manually to import from that. If you have patterns of variables, use the macro processor to help in creating repeating code.&lt;/P&gt;
&lt;P&gt;Since you have an incredibly high number of columns, you might run into limitations of the maximum SAS statement length, so split your variable definition (length, format etc) and input statements.&lt;/P&gt;
&lt;P&gt;Who comes up with the idea that 1500 columns can be practicable?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 08:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340319#M63235</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-13T08:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340336#M63236</link>
      <description>If I could change my variable names( permno1 to permno1,500), is there any way to use macro?&lt;BR /&gt;Or how about use variable orders(ex: var1 var2 var3...var1500)? T_T&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Mar 2017 09:06:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340336#M63236</guid>
      <dc:creator>okyk_86</dc:creator>
      <dc:date>2017-03-13T09:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340339#M63237</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130799"&gt;@okyk_86&lt;/a&gt; wrote:&lt;BR /&gt;If I could change my variable names( permno1 to permno1,500), is there any way to use macro?&lt;BR /&gt;Or how about use variable orders(ex: var1 var2 var3...var1500)? T_T&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Absolutely. Variable names like that lend themselves to all kinds of easier code.&lt;/P&gt;
&lt;P&gt;You can then even use them in lists:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format var1-var1500 10.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So it depends on the attributes of the columns. If they're all numeric, the data step can be extremely simple to write, and you won't even have problems with overlong statements (a single SAS statement must not exceed 32767 characters in length).&lt;/P&gt;
&lt;P&gt;If you have groups of variables with different attributes, using macro preprocessing will be the method of choice.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 09:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340339#M63237</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-13T09:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc import(for numerous variables)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340350#M63239</link>
      <description>&lt;P&gt;OK thank you for your help ^^&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 10:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-import-for-numerous-variables/m-p/340350#M63239</guid>
      <dc:creator>okyk_86</dc:creator>
      <dc:date>2017-03-13T10:03:23Z</dc:date>
    </item>
  </channel>
</rss>

