<?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: macro varibles in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359815#M84633</link>
    <description>&lt;P&gt;attached&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 20:26:25 GMT</pubDate>
    <dc:creator>JHE</dc:creator>
    <dc:date>2017-05-18T20:26:25Z</dc:date>
    <item>
      <title>macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359805#M84626</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode(lobname1,lobname2);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;PROC TRANSPOSE DATA=Paid_Claims_Final&amp;amp;lobname1 OUT=Paid_Claims_Final&amp;amp;lobname1TRANS (DROP=_NAME_);&lt;/P&gt;&lt;P&gt;ID MONTH;&lt;/P&gt;&lt;P&gt;BY LOB Category Code CODE_DESCRIPTION;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%&lt;STRONG&gt;&lt;I&gt;lobnocode&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0100'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Got the error:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATA, DELIM, DELIMITER, INDB, LABEL, LET, NAME, OUT, PREFIX,&lt;/P&gt;&lt;P&gt;SUFFIX.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Do no tknow why &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359805#M84626</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-18T20:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359808#M84629</link>
      <description>&lt;P&gt;table PAID_CLAIMS_FINAL0100&amp;nbsp; exisiting , no problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359808#M84629</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-18T20:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359810#M84630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/128890"&gt;@JHE&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode(lobname1,lobname2);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;PROC TRANSPOSE DATA=Paid_Claims_Final&amp;amp;lobname1 OUT=Paid_Claims_Final&amp;amp;lobname1TRANS (DROP=_NAME_);&lt;/P&gt;
&lt;P&gt;ID MONTH;&lt;/P&gt;
&lt;P&gt;BY LOB Category Code CODE_DESCRIPTION;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%&lt;STRONG&gt;&lt;I&gt;lobnocode&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0100'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Got the error:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATA, DELIM, DELIMITER, INDB, LABEL, LET, NAME, OUT, PREFIX,&lt;/P&gt;
&lt;P&gt;SUFFIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Do no tknow why &lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's always helpful to show us the entire SASLOG (or the relevant parts related to this PROC) and not just the ERROR message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a guess, what happens if you use this, where &amp;amp;lobname1 in the OUT= is followed by a period&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC TRANSPOSE DATA=Paid_Claims_Final&amp;amp;lobname1 OUT=Paid_Claims_Final&amp;amp;lobname1.TRANS (DROP=_NAME_);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 May 2017 20:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359810#M84630</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-18T20:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359815#M84633</link>
      <description>&lt;P&gt;attached&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359815#M84633</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-18T20:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359816#M84634</link>
      <description>&lt;P&gt;On your OUT= designation, SAS doesn't know what the name of the macro variable is.&amp;nbsp; Using lower/upper case isn't enough:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OUT=Paid_Claims_Final&amp;amp;lobname1TRANS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead, you have to tell SAS specifically where the name of the macro variable ends by adding a dot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OUT=Paid_Claims_Final&amp;amp;lobname1.TRANS&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359816#M84634</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-18T20:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359819#M84637</link>
      <description>&lt;P&gt;It is best to post code and log results into a code box using the forum {i} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many folks don't want to open Excel or Word documents because of security or corporate policy not allowing the download.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359819#M84637</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-18T20:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359820#M84638</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;This&amp;nbsp;code works. &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;Thank you &lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode(lobname1,lobname2);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;PROC TRANSPOSE DATA=Paid_Claims_Final&amp;amp;lobname1 OUT=Paid_Claims_Final&amp;amp;lobname1.TRANS (DROP=_NAME_);&lt;/P&gt;&lt;P&gt;ID MONTH;&lt;/P&gt;&lt;P&gt;BY LOB Category Code CODE_DESCRIPTION;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; LOBNoCode;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%&lt;STRONG&gt;&lt;I&gt;lobnocode&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'0100'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359820#M84638</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-18T20:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro varibles</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359822#M84639</link>
      <description>&lt;P&gt;ok, will do . Thank you remind me.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-varibles/m-p/359822#M84639</guid>
      <dc:creator>JHE</dc:creator>
      <dc:date>2017-05-18T20:38:59Z</dc:date>
    </item>
  </channel>
</rss>

