<?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 Puting variable in a string... in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132823#M260744</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Dear All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;I'm not sure what wrong i'm doing in below statement but the required output is not generating. Below should generate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;C:\CC_MTD_2013-03.xlsx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pMTD = '2013-03';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pCardMarketingFile = "C:\CC_Mtd_"&amp;amp;%substr(&amp;amp;pMTD,2,7)&amp;amp;".xlsx";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Request experts advice on this..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Rgds, Anil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Mar 2013 08:42:12 GMT</pubDate>
    <dc:creator>aj34321</dc:creator>
    <dc:date>2013-03-12T08:42:12Z</dc:date>
    <item>
      <title>Puting variable in a string...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132823#M260744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Dear All,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;I'm not sure what wrong i'm doing in below statement but the required output is not generating. Below should generate &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;C:\CC_MTD_2013-03.xlsx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pMTD = '2013-03';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pCardMarketingFile = "C:\CC_Mtd_"&amp;amp;%substr(&amp;amp;pMTD,2,7)&amp;amp;".xlsx";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Request experts advice on this..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Rgds, Anil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 08:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132823#M260744</guid>
      <dc:creator>aj34321</dc:creator>
      <dc:date>2013-03-12T08:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Puting variable in a string...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132824#M260745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code is working:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let pMTD = '2013-03';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let pCardMarketingFile = "/shared/BatchServer/CC_Mtd_%substr(&amp;amp;pMTD,2,7).xlsx";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%PUT &amp;amp;pCardMarketingFile;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the output in the log:-&lt;/P&gt;&lt;P&gt;======================================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let pCardMarketingFile = "/shared/BatchServer/CC_Mtd_%substr(&amp;amp;pMTD,2,7).xlsx";&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %PUT &amp;amp;pCardMarketingFile;&lt;/P&gt;&lt;P&gt;"/shared/BatchServer/CC_Mtd_2013-03.xlsx"&lt;/P&gt;&lt;P&gt;======================================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Daman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 08:54:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132824#M260745</guid>
      <dc:creator>damanaulakh88</dc:creator>
      <dc:date>2013-03-12T08:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Puting variable in a string...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132825#M260746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Hi Anil,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a small change you need to do like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the below code will create the macro variable pMTD with value 2013-03.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pMTD = '2013-03'; &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;you need to use the pMTD macro variable like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;%let pCardMarketingFile = "C:\CC_Mtd_&lt;STRONG&gt;&amp;amp;pMTD.&lt;/STRONG&gt;.xlsx";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;check the highlighted portion &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&amp;amp;pMTD. there is another . before the xlsx, &amp;amp;pMTD. will resolve to 2013-03 and the another . separates the filename from the extension. &lt;/STRONG&gt;Hope this helps you.&lt;STRONG&gt; &lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Jagadish&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 09:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132825#M260746</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2013-03-12T09:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Puting variable in a string...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132826#M260747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks once again....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 09:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Puting-variable-in-a-string/m-p/132826#M260747</guid>
      <dc:creator>aj34321</dc:creator>
      <dc:date>2013-03-12T09:23:13Z</dc:date>
    </item>
  </channel>
</rss>

