<?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: Mask percenatage in data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365634#M86871</link>
    <description>&lt;PRE&gt;%let k=&lt;FONT color="#FF00FF"&gt;%str(&lt;/FONT&gt;XYZ.DT&lt;FONT color="#FF00FF"&gt;%%&lt;FONT color="#000000"&gt;D&lt;/FONT&gt;&lt;/FONT&gt;ATE.&lt;FONT color="#FF00FF"&gt;)&lt;FONT color="#000000"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;
data temp;
dsn=&lt;FONT color="#FF00FF"&gt;symget('k')&lt;/FONT&gt;;
run;
proc print; run;&lt;/PRE&gt;
&lt;P&gt;How about this?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2017 12:02:58 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-06-09T12:02:58Z</dc:date>
    <item>
      <title>Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365597#M86847</link>
      <description>&lt;P&gt;The below piece of code give me warning message.&lt;/P&gt;&lt;P&gt;I want to get rid of this warning, please suggest appropiate way to mask it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let k=XYZ.DT%DATE.;
data temp;
dsn="&amp;amp;k";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 04:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365597#M86847</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2017-06-09T04:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365600#M86850</link>
      <description>&lt;P&gt;You are calling a macro called DATE.&lt;/P&gt;
&lt;P&gt;Does it exist and what does it do and what is the error message?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 04:57:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365600#M86850</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-09T04:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365603#M86851</link>
      <description>&lt;P&gt;My string has % in the text. I am not calling any macro.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 06:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365603#M86851</guid>
      <dc:creator>RahulG</dc:creator>
      <dc:date>2017-06-09T06:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365604#M86852</link>
      <description>&lt;P&gt;What's the message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I bet it's&amp;nbsp; &lt;FONT face="courier new,courier"&gt;WARNING: Apparent invocation of macro DATE not resolved.&amp;nbsp; &lt;/FONT&gt;which is self explanatory really.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need function %str() to use some characters in a macro value. Look it up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Maxims-of-Maximally-Efficient-SAS-Programmers/tac-p/362438" target="_self"&gt;See rules #1 and #2. &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 06:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365604#M86852</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-06-09T06:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365607#M86854</link>
      <description>&lt;P&gt;I bet your log looks like this:&lt;/P&gt;
&lt;PRE&gt;WARNING: Apparent invocation of macro DATE not resolved.
24         %let k=XYZ.DT%DATE.;
25         data temp;
26         dsn="&amp;amp;k";
WARNING: Apparent invocation of macro DATE not resolved.
27         run;
&lt;/PRE&gt;
&lt;P&gt;So what do you try to achieve by using the macro call(!) %date in the %let?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 07:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365607#M86854</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-09T07:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365613#M86856</link>
      <description>&lt;P&gt;It's difficult to remove both warnings. &amp;nbsp;The simplest way would be if you are allowed to change the value of your macro variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let k='XYZ.DT%DATE.';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data temp;&lt;/P&gt;
&lt;P&gt;dsn=&amp;amp;k;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 07:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365613#M86856</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-09T07:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365618#M86859</link>
      <description>&lt;P&gt;I am going to assume from your code there that DSN means that XYZ is the library name and DT%DATE. is the dataset name, and that your keeping this information for some reason. &amp;nbsp;Personally I don't like data (dates in this case) in dataset names, as this complicates any further programming activity. &amp;nbsp;I also question why you need a macro variable, and dataset to hold this information. &amp;nbsp;Once you have created the libname referece XYZ then you will automatically have this information in sashelp.vtable, so you can simply your life by just doing:&lt;/P&gt;
&lt;PRE&gt;libname xyz "...";

data temp;
  set sashelp.vtable (where=(libname="XYZ" and substr(name,1,2)="DT"));
run;&lt;/PRE&gt;
&lt;P&gt;All macro language is is a way to create Base SAS code, it is not a replacement for Base SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 08:31:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365618#M86859</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-09T08:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365634#M86871</link>
      <description>&lt;PRE&gt;%let k=&lt;FONT color="#FF00FF"&gt;%str(&lt;/FONT&gt;XYZ.DT&lt;FONT color="#FF00FF"&gt;%%&lt;FONT color="#000000"&gt;D&lt;/FONT&gt;&lt;/FONT&gt;ATE.&lt;FONT color="#FF00FF"&gt;)&lt;FONT color="#000000"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;
data temp;
dsn=&lt;FONT color="#FF00FF"&gt;symget('k')&lt;/FONT&gt;;
run;
proc print; run;&lt;/PRE&gt;
&lt;P&gt;How about this?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:02:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365634#M86871</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-06-09T12:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Mask percenatage in data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365635#M86872</link>
      <description>&lt;P&gt;If % is part of text, %nrstr is needed to mask it.&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; k&lt;SPAN class="token operator"&gt;=%nstr(&lt;/SPAN&gt;XYZ&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;DT&lt;SPAN class="token macroname"&gt;%DATE&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; temp&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
dsn&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"&amp;amp;k"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 12:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Mask-percenatage-in-data-step/m-p/365635#M86872</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2017-06-09T12:06:54Z</dc:date>
    </item>
  </channel>
</rss>

