<?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 Variable names in DI studio in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53712#M534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the swift reply - think I'm almost there but can't see what else I need to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've updated the properties of my external file to accept special characters, and have amended the mapping in my file writer so that _101 maps to 101 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that I need to set the External File Record Start Record to 2 in order for the header row to be written, but when I do this the job fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I set it to 1 the job succeeds but the header row is missing, this appears to show that the setting the accept special characters works but I'm missing a step to allow the file itself to be generated with special characters. I've investigated the VALIDVARNAME = ANY option but cannot get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone found a way of addressing this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Aug 2011 09:49:05 GMT</pubDate>
    <dc:creator>matt_w</dc:creator>
    <dc:date>2011-08-25T09:49:05Z</dc:date>
    <item>
      <title>Variable names in DI studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53710#M532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question about variable names in DI studio, but specifically about whether it is possible to output a SAS disallowed variable name to an external file XLS or CSV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that SAS does not allow a variable name to start with a number, and that if the result of a transpose is a numeric variable name SAS will prefix with an underscore, so variable 101 becomes _101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I generate a table which looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ORG&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;_101&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;_102&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;_103&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;_104&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an existing process which needs data to be presented in CSV format without the underscores&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ORG&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;101&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;102&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;103&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;104&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I produce 100's of output tables so would like to programmatically deal with this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a method in DI studio which will allow me to label my variables as the variable name minus the underscore in the export process? Or is there some other solution to allow me remove the underscore character on export?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grateful for advise.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 10:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53710#M532</guid>
      <dc:creator>matt_w</dc:creator>
      <dc:date>2011-08-24T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Variable names in DI studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53711#M533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Both table and external file objects have an option that permits special characters in object and column/filed names.&lt;/P&gt;&lt;P&gt;I haven't used them extensively, but hopefully it will help you out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Linus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 13:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53711#M533</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2011-08-24T13:25:44Z</dc:date>
    </item>
    <item>
      <title>Variable names in DI studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53712#M534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the swift reply - think I'm almost there but can't see what else I need to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've updated the properties of my external file to accept special characters, and have amended the mapping in my file writer so that _101 maps to 101 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that I need to set the External File Record Start Record to 2 in order for the header row to be written, but when I do this the job fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I set it to 1 the job succeeds but the header row is missing, this appears to show that the setting the accept special characters works but I'm missing a step to allow the file itself to be generated with special characters. I've investigated the VALIDVARNAME = ANY option but cannot get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone found a way of addressing this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 09:49:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53712#M534</guid>
      <dc:creator>matt_w</dc:creator>
      <dc:date>2011-08-25T09:49:05Z</dc:date>
    </item>
    <item>
      <title>Variable names in DI studio</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53713#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I ended up raising a track with SAS as I wasn't getting anywhere - think this is down to my lack of previous SAS coding experience, a more experienced user may have found this problem much more quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Turns out there's a bug in the version I'm using (4.21) which incorrectly generates the header rows in the file writer transformation. This is addressed by going into the file writer and amending the section of code which generates the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if ( _n_ = 1 ) then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put &lt;/P&gt;&lt;P&gt;incorrect -&amp;gt;&amp;nbsp; &lt;STRONG&gt;""Org"n,"_101"n,"_102"n";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( _n_ = 1 ) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put&lt;/P&gt;&lt;P&gt;correct -&amp;gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;"Org,_101,_102";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And once I've changed this bit of code I'm able to remove the leading underscores and export in my desired format!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS tell me this bug is fixed in version 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 11:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-names-in-DI-studio/m-p/53713#M535</guid>
      <dc:creator>matt_w</dc:creator>
      <dc:date>2011-09-02T11:33:21Z</dc:date>
    </item>
  </channel>
</rss>

