<?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: Broken automated macro list generating code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197052#M36958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length list $1000.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 101;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list=catx(',',list,quote(put(i,z4.)));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symputx('list',list);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;list;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Aug 2015 19:00:52 GMT</pubDate>
    <dc:creator>slchen</dc:creator>
    <dc:date>2015-08-11T19:00:52Z</dc:date>
    <item>
      <title>Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197051#M36957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is my code so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options mlogic mprint symbolgen spool NOQUOTELENMAX ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro schlub (num1=, num2=);&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; test = %str(%')&lt;/P&gt;&lt;P&gt;&amp;nbsp; %do i = &amp;amp;num1. %to 9; &lt;/P&gt;&lt;P&gt;&amp;nbsp; %str("000&amp;amp;i.",)&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end; &lt;/P&gt;&lt;P&gt;&amp;nbsp; %do i = 10 %to 99;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %str("00&amp;amp;i.",)&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end; &lt;/P&gt;&lt;P&gt;&amp;nbsp; %do i = 100 %to &amp;amp;num2.; &lt;/P&gt;&lt;P&gt;&amp;nbsp; %str("0&amp;amp;i.",)&lt;/P&gt;&lt;P&gt;&amp;nbsp; %end; %str(%')&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;call symput("list", test);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend schlub;&lt;/P&gt;&lt;P&gt;%schlub(num1=0001, num2=0101);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it produces this error: &lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1761:30&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TEMP may be incomplete.&amp;nbsp; When this step was stopped there were 0 observations and 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.TEMP was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.22 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.15 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should more or less create this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; test = ' "0001", "0002", "0003", "0004", "0005", "0006", "0007", "0008", "0009", "0010", "0011",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0012", "0013", "0014", "0015", "0016", "0017", "0018", "0019", "0020", "0021", "0022", "0023", "0024", "0025", "0026",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0027", "0028", "0029", "0030", "0031", "0032", "0033", "0034", "0035", "0036", "0037", "0038", "0039", "0040", "0041",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0042", "0043", "0044", "0045", "0046", "0047", "0048", "0049", "0050", "0051", "0052", "0053", "0054", "0055", "0056",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0057", "0058", "0059", "0060", "0061", "0062", "0063", "0064", "0065", "0066", "0067", "0068", "0069", "0070", "0071",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0072", "0073", "0074", "0075", "0076", "0077", "0078", "0079", "0080", "0081", "0082", "0083", "0084", "0085", "0086",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "0087", "0088", "0089", "0090", "0091", "0092", "0093", "0094", "0095", "0096", "0097", "0098", "0099", "0100", "0101"';&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symput("list", test);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I need to add a little logic to remove the comma at the last number, but I am trying to resolve this error first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 18:30:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197051#M36957</guid>
      <dc:creator>P_2</dc:creator>
      <dc:date>2015-08-11T18:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197052#M36958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length list $1000.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 101;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list=catx(',',list,quote(put(i,z4.)));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symputx('list',list);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;list;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 19:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197052#M36958</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-08-11T19:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197053#M36959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You generally don't need comma's between characters for IN clauses so you can skip that step.&lt;/P&gt;&lt;P&gt;Shenglin's solution is better and you can macrotize that if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 19:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197053#M36959</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-11T19:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197054#M36960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you actually trying to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; schlub (num1=, num2=,len=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i sep;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&amp;amp;num1 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &amp;amp;num2 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green; background: white;"&gt;*;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"%sysfunc(putn(&amp;amp;i,Z&amp;amp;len))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;%*;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sep=,;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; schlub;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; list=%schlub(num1=1, num2=101);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &amp;amp;list;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 22:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197054#M36960</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-11T22:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197055#M36961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all .&amp;nbsp; Both Tom and Shenglin's methods perfectly accomplish what I am trying to do.&amp;nbsp; I wanted to easily create a macro list from a range of codes, inputting two numbers.&amp;nbsp; In this case, 0001 through 0101.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 13:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197055#M36961</guid>
      <dc:creator>P_2</dc:creator>
      <dc:date>2015-08-12T13:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197056#M36962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, there is no need to use macro code at all:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length test $2000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i=1 to 101;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test=catx(",",test,put(i,z4.));&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 13:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197056#M36962</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-12T13:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197057#M36963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am intrigued by the trailing %*; in your macro.&amp;nbsp; I've seen the leading %*; as a way to avoid white space, but never seen the trailing %*;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it must be unnecessary, but then found when I removed it the macro wouldn't compile.&amp;nbsp; But interestingly if I changed to &amp;amp;sep"%sysfunc(putn(&amp;amp;I,Z&amp;amp;len))" it would compile.&amp;nbsp; So removing the extraneous (in a sense) dot after &amp;amp;sep makes the trailing %*; unnecessary.&amp;nbsp; This seems like an odd macro compiler bug to me, do you agree?&amp;nbsp; Any understanding of what causes it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is some sample code, where I replicate the problem, then test different workarounds.&amp;nbsp; Seems to me like the problem only happens when you have a macro var reference with traling dot followed but a string in double quotes which includes a macro invocation.&amp;nbsp; Ugh.&lt;/P&gt;&lt;DIV style="font-family: Consolas; font-size: 11pt;"&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;options&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;mcompilenote&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=all;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*wont compile without trailing macro comment;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; doesnotcompile(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sep;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%sysfunc(putn(1,Z2))"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*Recover;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*";&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*Compiles with trailing macro comment;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sep;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%sysfunc(putn(1,Z2))"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;%*;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*Compiles without trailing macro comment, no dot after &amp;amp;sep;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sep;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &amp;amp;sep&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%sysfunc(putn(1,Z2))"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*Compiles without trailing macro comment, so quote marks are part of cause;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sep;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;sep.&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%sysfunc&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(putn(&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,Z2))&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*Compiles without trailing macro comment, so macro call is part of cause;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; sep;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"HiMom"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197057#M36963</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-08-12T14:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197058#M36964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I put it there because it made it work.&amp;nbsp; Originally I had the %DO;...%END all on one line and it worked. But when I reformatted it to look pretty it broke.&lt;/P&gt;&lt;P&gt;I am not sure why.&amp;nbsp; Perhaps it is stuck looking to see there is going to be a letter after the quote to indicate a literal type?&amp;nbsp; Ie "01JAN1960"d &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197058#M36964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-12T14:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Broken automated macro list generating code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197059#M36965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sigh, was hoping you'd be able to make my head stop hurting over this. : )&amp;nbsp; I don't think it's just looking for a date literal.&amp;nbsp; That wouldn't explain why removing the dot after the macro variable reference avoids the problem.&amp;nbsp; Thanks for mentioning %do/%end.&amp;nbsp; Definitely seems like white space after the closing quote is part of the problem.&amp;nbsp; Very odd.&amp;nbsp; Will think more on Friday, maybe start a new thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; doesnotcompile(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%upcase(q)"&lt;/SPAN&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*remove dot;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;amp;sep&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%upcase(q)"&lt;/SPAN&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;*with dot but remove white space after closing quote;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%macro&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; compiles(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummy&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;amp;sep&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;.&lt;/STRONG&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;"%upcase(q)"&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;%mend&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Broken-automated-macro-list-generating-code/m-p/197059#M36965</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-08-12T15:35:39Z</dc:date>
    </item>
  </channel>
</rss>

