<?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: NLITERAL Parsed Label in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795082#M254993</link>
    <description>&lt;P&gt;Please provide an actual example and the desired result.&lt;/P&gt;
&lt;P&gt;I am afraid that "rename a variable" in this context is very likely going to be difficult if your label has any length at all. Even with the generally ugly and awkward to use name literals you are still limited to 32 characters for the variable name.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 23:14:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-02-08T23:14:32Z</dc:date>
    <item>
      <title>NLITERAL Parsed Label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795075#M254987</link>
      <description>&lt;P&gt;I want to use the nliteral function to rename a variable into the label, however, I need to parse the label. Is it possible to combine the nliteral with the scan function, or if not is there a workaround?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 21:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795075#M254987</guid>
      <dc:creator>SAS_Muggle</dc:creator>
      <dc:date>2022-02-08T21:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: NLITERAL Parsed Label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795076#M254988</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416033"&gt;@SAS_Muggle&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to use the nliteral function to rename a variable into the label, however, I need to parse the label. Is it possible to combine the nliteral with the scan function, or if not is there a workaround?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I cannot figure out what you mean.&amp;nbsp; You only need to apply the NLITERAL() function to the value once you have decided what you want it to be.&amp;nbsp; Finish all of your "parsing" before you get to the step of generating the new name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length new_name $64 ;
  * generate new_name from LABEL ;
  new_name=substr(coalesce(label,name),1,32);
  * Now make it an name literal ;
  new_name = nliteral(new_name);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Feb 2022 22:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795076#M254988</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-08T22:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: NLITERAL Parsed Label</title>
      <link>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795082#M254993</link>
      <description>&lt;P&gt;Please provide an actual example and the desired result.&lt;/P&gt;
&lt;P&gt;I am afraid that "rename a variable" in this context is very likely going to be difficult if your label has any length at all. Even with the generally ugly and awkward to use name literals you are still limited to 32 characters for the variable name.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 23:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/NLITERAL-Parsed-Label/m-p/795082#M254993</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-02-08T23:14:32Z</dc:date>
    </item>
  </channel>
</rss>

