<?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 with PC Files Server can't read variable names properly with spaces in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897909#M39940</link>
    <description>&lt;P&gt;I definitely did all types of validvarname.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 06:22:20 GMT</pubDate>
    <dc:creator>Carabas</dc:creator>
    <dc:date>2023-10-10T06:22:20Z</dc:date>
    <item>
      <title>PROC IMPORT with PC Files Server can't read variable names properly with spaces</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897876#M39935</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using 9.4 Base. Since I have x86 Office and x64 SAS, I use DMBS = EXCELCS in PROC IMPORT to read excel files.&lt;/P&gt;&lt;P&gt;Some of the variables are like "&amp;nbsp; &amp;nbsp;X Y&amp;nbsp; &amp;nbsp;", with 3 leading and 3 trailing spaces and one in between. I need to read these variables to "X_Y".&lt;/P&gt;&lt;P&gt;This is achievable effortlessly by my coworker's setup of x86 SAS, which does not have to enable PC Files Server, with simply DBMS = EXCEL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why this difference exists. And I wonder if there are fixes to remediate this while not deviating from the existing version?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 21:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897876#M39935</guid>
      <dc:creator>Carabas</dc:creator>
      <dc:date>2023-10-09T21:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT with PC Files Server can't read variable names properly with spaces</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897880#M39936</link>
      <description>&lt;P&gt;Can you get the creator of the file to not add those spaces into the header row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the non-Microsoft XLSX engine will also include the leading spaces when defining the variable name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sounds like you will need to post-process the file.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=HAVE noprint out=contents;run;
proc sql noprint;
select catx('=',nliteral(name),nliteral(left(name)))
  into :renames separated by ' ' 
  from contents
  where name ne left(name)
;
quit;
%if &amp;amp;sqlobs %then %do;
proc datasets lib=WORK nolist;
  modify have;
  rename &amp;amp;renames;
  run;
quit;
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Oct 2023 22:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897880#M39936</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-09T22:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT with PC Files Server can't read variable names properly with spaces</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897896#M39939</link>
      <description>&lt;P&gt;Make sure you have&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options validvarname=v7;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;set before you run your PROC IMPORT.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 04:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897896#M39939</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-10T04:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT with PC Files Server can't read variable names properly with spaces</title>
      <link>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897909#M39940</link>
      <description>&lt;P&gt;I definitely did all types of validvarname.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 06:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/PROC-IMPORT-with-PC-Files-Server-can-t-read-variable-names/m-p/897909#M39940</guid>
      <dc:creator>Carabas</dc:creator>
      <dc:date>2023-10-10T06:22:20Z</dc:date>
    </item>
  </channel>
</rss>

