<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433157#M107376</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104137"&gt;@zhuxiaoyan1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I just figured out why my macro did not work. I have to use " " instead of ' '.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Mark this post as the "solution" so folks know the issue was answered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future please post code and/or log text&amp;nbsp;into a code box such as is opened with the forums {I} or "running man" icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the code boxes will preserve formatting (indenting and such) and make things easier to read. Also many error messages have indicators where the error is recognized by SAS but the main message windows will reformat text to move the diagnostic characters.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2018 16:14:54 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-02-01T16:14:54Z</dc:date>
    <item>
      <title>macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433148#M107370</link>
      <description>&lt;P&gt;I have the following programs:. The nonmacro part works but the macro doesn't work. This is the note from log:&lt;/P&gt;&lt;P&gt;Table WORK.ETG_999900 created, with 0 rows and 5 columns. I can't figure out why it gives me nothing. Any suggestions/solutions will be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Store &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"\\nasnpmmds\EBI1\mmds\AHCPII\OPTUMCheck"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;CREATE&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;TABLE&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; WORK.ETG_999900 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;AS&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;SELECT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; t1.ETG_NBR, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;t1.EPI_TYPE_KEY,&lt;/P&gt;&lt;P&gt;t1.EPI_NBR,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* DESC */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Orphan Record'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;AS&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DESC&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* Short_ETG */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;(substr(t1.ETG_NBR, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;AS&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Short_ETG&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; store.lost_claims_91 t1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; (CALCULATED Short_ETG) = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'999900'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;ORDER&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;BY&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; t1.EPI_TYPE_KEY,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;t1.EPI_NBR;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;QUIT&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETG(DESC, ETG);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;CREATE TABLE WORK.ETG_&amp;amp;ETG AS&lt;/P&gt;&lt;P&gt;SELECT t1.ETG_NBR,&lt;/P&gt;&lt;P&gt;t1.EPI_TYPE_KEY,&lt;/P&gt;&lt;P&gt;t1.EPI_NBR,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* DESC */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'&amp;amp;DESC'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;) AS DESC, &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* Short_ETG */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;(substr(t1.ETG_NBR, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)) AS Short_ETG&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FROM Store.lost_claims_91 t1&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;WHERE (CALCULATED Short_ETG) = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'&amp;amp;ETG'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORDER BY t1.EPI_TYPE_KEY,&lt;/P&gt;&lt;P&gt;t1.EPI_NBR;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETG;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;%&lt;STRONG&gt;&lt;I&gt;ETG&lt;/I&gt;&lt;/STRONG&gt;(Orphan Record, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;999900&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 15:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433148#M107370</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2018-02-01T15:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433155#M107375</link>
      <description>&lt;P&gt;I just figured out why my macro did not work. I have to use " " instead of ' '.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 16:07:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433155#M107375</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2018-02-01T16:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433157#M107376</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/104137"&gt;@zhuxiaoyan1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I just figured out why my macro did not work. I have to use " " instead of ' '.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Mark this post as the "solution" so folks know the issue was answered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the future please post code and/or log text&amp;nbsp;into a code box such as is opened with the forums {I} or "running man" icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the code boxes will preserve formatting (indenting and such) and make things easier to read. Also many error messages have indicators where the error is recognized by SAS but the main message windows will reformat text to move the diagnostic characters.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 16:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro/m-p/433157#M107376</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-01T16:14:54Z</dc:date>
    </item>
  </channel>
</rss>

