<?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 deal with variable name having space in SAS Enterprise Guide in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29948#M4088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, in v6.1, Enterprise Guide added a Naming options section in Tools-&amp;gt;Data-&amp;gt;Data General that allows you to control the default valid variable and member naming rules (still defaults to validvarname=any and validmemname=extend).&amp;nbsp; You can change it to V7 if desired to go back to the more restrictive naming rules.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="deleteme.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10282_deleteme.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2015 18:22:16 GMT</pubDate>
    <dc:creator>CaseySmith</dc:creator>
    <dc:date>2015-05-05T18:22:16Z</dc:date>
    <item>
      <title>How to deal with variable name having space in SAS Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29945#M4085</link>
      <description>I am new to SAS Enterprise Guide. When I used SAS 8.2, if the variable name has space in between, SAS will automatically add "_". But it seems that EG will leave the space in the variable name. So is there any systemic way to deal with it? For example, I have 100 variables in my raw data. After I import it to SAS, is it possible to add "_" for the space for the variable name automatically? Thanks!</description>
      <pubDate>Wed, 09 Jul 2008 04:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29945#M4085</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-07-09T04:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with variable name having space in SAS Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29946#M4086</link>
      <description>It is related to the VALIDVARNAME=ANY system option used by EG. This will allow any character to be part of a SAS variable name. Can it be totally turned out for the whole SAS EG session ? I don't see how, but this would be the quickest answer to your problem.&lt;BR /&gt;
Otherwise, you can create a RENAME statement using macros to replace blanks by underscores. Something like that :&lt;BR /&gt;
[pre]&lt;BR /&gt;
OPTION VALIDVARNAME = ANY ;&lt;BR /&gt;
DATA work.test ;&lt;BR /&gt;
	INPUT "my spaced name 1"n "my spaced name 2"n myRegular_SAS_name ;&lt;BR /&gt;
CARDS ;&lt;BR /&gt;
1 1 3&lt;BR /&gt;
1 2 3&lt;BR /&gt;
;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC PRINT DATA = work.test ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC CONTENTS DATA = work.test OUT = work.dictionary NOPRINT ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
PROC SQL NOPRINT ;&lt;BR /&gt;
	SELECT CATS(NLITERAL(name),"=",TRANSLATE(STRIP(name),"_"," ")) INTO : renameList SEPARATED BY " "&lt;BR /&gt;
	FROM work.dictionary&lt;BR /&gt;
	WHERE STRIP(name) CONTAINS " "&lt;BR /&gt;
	;&lt;BR /&gt;
QUIT ;&lt;BR /&gt;
PROC DATASETS LIB = work NOLIST ;&lt;BR /&gt;
	MODIFY test ;&lt;BR /&gt;
	RENAME &amp;amp;renameList ;&lt;BR /&gt;
RUN ; QUIT ;&lt;BR /&gt;
PROC PRINT DATA = work.test ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Regards.&lt;BR /&gt;
Olivier</description>
      <pubDate>Wed, 09 Jul 2008 09:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29946#M4086</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2008-07-09T09:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with variable name having space in SAS Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29947#M4087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/13/765.html" title="http://support.sas.com/kb/13/765.html"&gt;13765 - PROC IMPORT imports column names differently in SAS® Enterprise Guide®&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 17:40:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29947#M4087</guid>
      <dc:creator>USMCJC</dc:creator>
      <dc:date>2015-05-05T17:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to deal with variable name having space in SAS Enterprise Guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29948#M4088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, in v6.1, Enterprise Guide added a Naming options section in Tools-&amp;gt;Data-&amp;gt;Data General that allows you to control the default valid variable and member naming rules (still defaults to validvarname=any and validmemname=extend).&amp;nbsp; You can change it to V7 if desired to go back to the more restrictive naming rules.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="deleteme.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10282_deleteme.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 18:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-deal-with-variable-name-having-space-in-SAS-Enterprise/m-p/29948#M4088</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2015-05-05T18:22:16Z</dc:date>
    </item>
  </channel>
</rss>

