<?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: ODS output tables with variable names as numbers in SAS OnDemand in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744499#M25047</link>
    <description>Brilliant. This worked. Thanks. Tom was on the right track.</description>
    <pubDate>Fri, 28 May 2021 18:20:02 GMT</pubDate>
    <dc:creator>markgewhite</dc:creator>
    <dc:date>2021-05-28T18:20:02Z</dc:date>
    <item>
      <title>ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744343#M25037</link>
      <description>&lt;P&gt;When using ODS Output I discovered that in SAS OnDemand some tables have variable names as numbers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously in SAS Studio University Edition, those same variables would have had an underscore prefix. eg _1 _2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How am I to refer to these fields in a subsequent statement without getting an error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a simplified version of what I'm doing. I fit a GLM model and send the LSMeans Difference output to a table. I then try to refer to it but fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* run the model and generate the ODS Output data */&lt;BR /&gt;proc glm data=TEST;
	class FactorA FactorB FactorC;
	model Outcome = FactorA FactorB FactorC;
	lsmeans FactorA FactorB FactorC / adjust=tukey pdiff=all alpha=0.05 cl;
	ods output diff = GLM_DIFF;
run;

/* previously offline this would work */&lt;BR /&gt;proc means data = GLM_DIFF;
	var _1 _2 _3;
run;&lt;BR /&gt;&lt;BR /&gt;/* but fields are now 1 2 3 */&lt;BR /&gt;/* and this fails */&lt;BR /&gt;proc means data = GLM_DIFF; &lt;BR /&gt;        var 1 2 3;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;I can't figure out what the correct syntax should be. Can someone help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 08:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744343#M25037</guid>
      <dc:creator>markgewhite</dc:creator>
      <dc:date>2021-05-28T08:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744444#M25040</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this can be solved by a SAS Name Literal.&lt;/P&gt;
&lt;P&gt;Enclose variable name or data set name in quotes immediately followed by little &lt;EM&gt;n&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sedanTypes; 
   set cars; 
   by 'Sedan Types'n; 								
   if 'first.Sedan Types'n then type=1;   
run;  	&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See documentation for&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using Name Literals and Avoiding Errors When Using Name Literals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 15:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744444#M25040</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-28T15:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744445#M25041</link>
      <description>&lt;P&gt;It could also be that you are looking at the labels, being 1,2 &amp;amp; 3.&lt;/P&gt;
&lt;P&gt;The variable names may still contain an underscore as a prefix.&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 15:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744445#M25041</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-28T15:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744451#M25042</link>
      <description>&lt;P&gt;Check the setting of the VALIDVARNAME option.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have VALIDVARNAME=V7 then you cannot create a variable with a name like 1.&lt;/P&gt;
&lt;P&gt;If you have VALIDVARNAME=ANY then you can.&amp;nbsp; If you have created datasets with names like that then you need to use name literal to reference the variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data = GLM_DIFF; 
  var '1'n '2'n '3'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 May 2021 15:52:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744451#M25042</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-28T15:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744452#M25043</link>
      <description>If you add the following option to your code or autoexec it should help avoid those issues:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;options validvarname=v7;&lt;BR /&gt;&lt;BR /&gt;Then it'll generate them as _1, _2 etc.   &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 May 2021 15:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744452#M25043</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-28T15:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744495#M25044</link>
      <description>&lt;P&gt;I'm afraid that didn't work for me. I tried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc means data = GLM_DIFF;
	var 'GLM_DIFF'1;
run;&lt;/PRE&gt;&lt;P&gt;And other such variations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 18:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744495#M25044</guid>
      <dc:creator>markgewhite</dc:creator>
      <dc:date>2021-05-28T18:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744496#M25045</link>
      <description>No. The variables are definitely named 1, 2, etc. Thanks, though.</description>
      <pubDate>Fri, 28 May 2021 18:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744496#M25045</guid>
      <dc:creator>markgewhite</dc:creator>
      <dc:date>2021-05-28T18:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744498#M25046</link>
      <description>Thanks. I see where you're coming from, but I'm not creating the variable names. ODS is.</description>
      <pubDate>Fri, 28 May 2021 18:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744498#M25046</guid>
      <dc:creator>markgewhite</dc:creator>
      <dc:date>2021-05-28T18:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output tables with variable names as numbers in SAS OnDemand</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744499#M25047</link>
      <description>Brilliant. This worked. Thanks. Tom was on the right track.</description>
      <pubDate>Fri, 28 May 2021 18:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-output-tables-with-variable-names-as-numbers-in-SAS-OnDemand/m-p/744499#M25047</guid>
      <dc:creator>markgewhite</dc:creator>
      <dc:date>2021-05-28T18:20:02Z</dc:date>
    </item>
  </channel>
</rss>

