<?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: Only use some of a variable name in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35592#M8794</link>
    <description>The DATA step can only reference variable values, identified by the variable name, except when using a "dataset option" RENAME= on your SET statement possibly, or by using SAS macro language to generate your DATA step SAS code with a MACRO -- though a pre-processor DATA step could be used instead of a macro, if you lack macro coding experience.&lt;BR /&gt;
&lt;BR /&gt;
Recommend searching the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website using the Google advanced search argument listed below:&lt;BR /&gt;
&lt;BR /&gt;
data step generate sas code site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Fri, 22 May 2009 16:49:20 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-05-22T16:49:20Z</dc:date>
    <item>
      <title>Only use some of a variable name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35590#M8792</link>
      <description>Hello&lt;BR /&gt;
&lt;BR /&gt;
I am working with some variables with quite long names (made out of numbers). When i run my analyses, I only want to use the first two numbers in the variable name, but how do I do that?&lt;BR /&gt;
&lt;BR /&gt;
I have tried this: &lt;BR /&gt;
&lt;BR /&gt;
temp_1=substr(variablename,1,2);&lt;BR /&gt;
&lt;BR /&gt;
But it doesn't work. What am I doing wrong?&lt;BR /&gt;
&lt;BR /&gt;
Kind regards.</description>
      <pubDate>Fri, 22 May 2009 12:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35590#M8792</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-22T12:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Only use some of a variable name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35591#M8793</link>
      <description>Please refer to this note.....&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000998953.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000998953.htm&lt;/A&gt;</description>
      <pubDate>Fri, 22 May 2009 13:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35591#M8793</guid>
      <dc:creator>GPatel</dc:creator>
      <dc:date>2009-05-22T13:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Only use some of a variable name</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35592#M8794</link>
      <description>The DATA step can only reference variable values, identified by the variable name, except when using a "dataset option" RENAME= on your SET statement possibly, or by using SAS macro language to generate your DATA step SAS code with a MACRO -- though a pre-processor DATA step could be used instead of a macro, if you lack macro coding experience.&lt;BR /&gt;
&lt;BR /&gt;
Recommend searching the SAS support  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  website using the Google advanced search argument listed below:&lt;BR /&gt;
&lt;BR /&gt;
data step generate sas code site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 22 May 2009 16:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Only-use-some-of-a-variable-name/m-p/35592#M8794</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-22T16:49:20Z</dc:date>
    </item>
  </channel>
</rss>

