<?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: Varibale names got spaces and special chars while importing csv file to sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Varibale-names-got-spaces-and-special-chars-while-importing-csv/m-p/326366#M72665</link>
    <description>&lt;P&gt;Is your file comma delimited or tab delimited?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I used for both and the imports were both successful. The spaces and slashes in the variable names were all changed to underscores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile="c:\art\test.csv" out=want replace dbms=csv;
  getnames=yes;
run;


proc import datafile="c:\art\test.txt" out=outdsetname replace dbms=dlm;
  getnames=yes;
  delimiter='09'x;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2017 17:45:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-01-20T17:45:46Z</dc:date>
    <item>
      <title>Varibale names got spaces and special chars while importing csv file to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Varibale-names-got-spaces-and-special-chars-while-importing-csv/m-p/326347#M72657</link>
      <description>&lt;P&gt;Hi experts ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read a CSV file and the variable names is having spaces and some special charectors (/) example of variable name and observation below. while it reading its not getting in properly . Please advice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Policy ID&lt;/TD&gt;&lt;TD&gt;Policy Effective Date&lt;/TD&gt;&lt;TD&gt;Policy Expiration Date&lt;/TD&gt;&lt;TD&gt;Producer&lt;/TD&gt;&lt;TD&gt;State&lt;/TD&gt;&lt;TD&gt;Company&lt;/TD&gt;&lt;TD&gt;New/Renew Code&lt;/TD&gt;&lt;TD&gt;Premium&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AZA12467955&lt;/TD&gt;&lt;TD&gt;20160801&lt;/TD&gt;&lt;TD&gt;20170201&lt;/TD&gt;&lt;TD&gt;42491662&lt;/TD&gt;&lt;TD&gt;CA&lt;/TD&gt;&lt;TD&gt;55&lt;/TD&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;2160&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AZA12553486&lt;/TD&gt;&lt;TD&gt;20160223&lt;/TD&gt;&lt;TD&gt;20170223&lt;/TD&gt;&lt;TD&gt;4108496&lt;/TD&gt;&lt;TD&gt;AZ&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;R&lt;/TD&gt;&lt;TD&gt;406&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 17:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Varibale-names-got-spaces-and-special-chars-while-importing-csv/m-p/326347#M72657</guid>
      <dc:creator>ambadi007</dc:creator>
      <dc:date>2017-01-20T17:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Varibale names got spaces and special chars while importing csv file to sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Varibale-names-got-spaces-and-special-chars-while-importing-csv/m-p/326366#M72665</link>
      <description>&lt;P&gt;Is your file comma delimited or tab delimited?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code I used for both and the imports were both successful. The spaces and slashes in the variable names were all changed to underscores.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile="c:\art\test.csv" out=want replace dbms=csv;
  getnames=yes;
run;


proc import datafile="c:\art\test.txt" out=outdsetname replace dbms=dlm;
  getnames=yes;
  delimiter='09'x;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 17:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Varibale-names-got-spaces-and-special-chars-while-importing-csv/m-p/326366#M72665</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-01-20T17:45:46Z</dc:date>
    </item>
  </channel>
</rss>

