<?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 interpreting array incorrectly in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198007#M37072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This solved the issue, I probably copied this from another line somewhere and accidentally retained the colon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jun 2015 16:36:09 GMT</pubDate>
    <dc:creator>lbarwick</dc:creator>
    <dc:date>2015-06-02T16:36:09Z</dc:date>
    <item>
      <title>Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198001#M37066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using call execute to pass values from a table to parameters in my macro code. The intent is to produce an output table for each prot and table containing only specific fields based on my projects meta data. One of the parameters is a list of fields that I have concatenated together that I want to use in a keep statement, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="85" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="border: 1px solid #000000; width: 353px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;prot&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;table&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;char_fields&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;num_fields&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AAA01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR1 CHAR2 CHAR3 CHAR4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM1 NUM2 NUM3 NUM4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AAA01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR1 CHAR2 CHAR3 CHAR4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM1 NUM2 NUM3 NUM4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BBB01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR1 CHAR2 CHAR3 CHAR4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM1 NUM2 NUM3 NUM4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;BBB01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR1 CHAR2 CHAR3 CHAR4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM1 NUM2 NUM3 NUM4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One variable in the source table is a list of character formatted fields, the other is a list of numeric formatted fields. I am passing the char_fields value to a character array within the macro, and the num_fields to a numeric array in the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro freetext (prot,table,charfield,numfield);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;prot._&amp;amp;table1&lt;/P&gt;&lt;P&gt;set &amp;amp;prot._&amp;amp;table;&lt;/P&gt;&lt;P&gt;by prot;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array charfield (*) &amp;amp;charfields:;&lt;/P&gt;&lt;P&gt;array numfield (*) &amp;amp;numfields:;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;keep site prot patid &amp;amp;charfields &amp;amp;numfields; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend freetext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set source;&lt;/P&gt;&lt;P&gt;call&lt;/P&gt;&lt;P&gt;execute('%freetext('||prot||','||table||','||charfields||','||numfields||')');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, this works for 99% of the tables produced via the macro, but for a few, the macro seems to be mis-interpreting the field type in the array statements and throws this error:&lt;/P&gt;&lt;P&gt;ERROR: All variables in array list must be the same type, i.e., all numeric or character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried executing the data step outside of the macro by hard coding the array and I do not get this error message. Does anyone happen to know why the array is behaving differently within the macro vs. outside of it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 14:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198001#M37066</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2015-06-02T14:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198002#M37067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide test data in a datastep which causes the issue, and the exact code you are using.&amp;nbsp; The code you posted is wrong in several ways:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%macro freetext (prot,table,charfield,numfield);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data &amp;amp;prot._&amp;amp;table1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Missing semicolon to close data, and missing dot to finish macro variable */&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set &amp;amp;prot._&amp;amp;table;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; / * we have no example of what &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;AAA01.01 looks like, and datasets should not be numeric start */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;by prot;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;array charfield (*) &amp;amp;charfields:;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Macro variables are terminated by a full stop, not a semicolon.&amp;nbsp; Charfields is not a macro variable witihin this code &amp;amp;CHARFIELD. */&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;array numfield (*) &amp;amp;numfields:;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* As above */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;keep site prot patid &amp;amp;charfields &amp;amp;numfields; run;&amp;nbsp;&amp;nbsp; /* as above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%mend freetext&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;data _null_;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;set source;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;call&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;execute('%freetext('||prot||','||table||','||charfields||','||numfields||')');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Missing semicolon after first ) */&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 14:51:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198002#M37067</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-02T14:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198003#M37068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, in my haste to post this and anonymize my code there were probably some typos. Here is my complete code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro freetext (prot,table,freefieldlist,charfieldlist,numfieldlist);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;prot._&amp;amp;table;&lt;/P&gt;&lt;P&gt;set &amp;amp;prot..&amp;amp;table;&lt;/P&gt;&lt;P&gt;by prot;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array charfield (*) &amp;amp;charfieldlist:;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array numfield (*) &amp;amp;numfieldlist:;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; keep site prot patid &amp;amp;charfieldlist &amp;amp;numfieldlist; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend freetext;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set source;&lt;/P&gt;&lt;P&gt;call&lt;/P&gt;&lt;P&gt;execute('%freetext('||prot||','||table_name||','||freefieldlist||','||charfieldlist||','||numfieldlist||')');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the source table I am using in call execute:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="121" style="border: 1px solid rgb(0, 0, 0); width: 475px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;prot&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;table_name&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;charfieldlist&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;numfieldlist&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;TAB1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR1 CHAR3 CHAR5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM1 NUM3 NUM4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC02&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;TAB2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR6 CHAR7 CHAR&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM6 NUM7 NUM8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ABC03&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;TAB3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;CHAR11 CHAR13 CHAR14&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NUM12 NUM13 NUM14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of &amp;amp;prot..&amp;amp;table used in set statement (in this case the TAB1 table for prot ABC01):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="101" style="border: 1px solid rgb(0, 0, 0); width: 433px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;site&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;prot&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;patid&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CHAR1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CHAR2&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CHAR3&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CHAR4&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;CHAR5&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;NUM1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;NUM2&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;NUM3&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;NUM4&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;NUM5&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;DEF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GHI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;JKL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;MNO&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;111&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;222&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;333&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;444&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;555&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;DDE&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GGH&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;JJK&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;MMN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;223&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;334&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;445&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;556&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EEF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;HHI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;KKL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;NNO&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;113&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;224&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;335&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;446&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;557&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the &amp;amp;prot._&amp;amp;table output after the macro executes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="101" style="border: 1px solid rgb(0, 0, 0); width: 396px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;site&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;prot&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;patid&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;char1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;char3&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;char5&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;num1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;num3&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;num4&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GHI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;MNO&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;111&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;333&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;444&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AAB&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GGH&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;MMN&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;334&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;445&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Site3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;ABC01&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;BBC&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;HHI&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;KKL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;113&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;335&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;446&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198003#M37068</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2015-06-02T15:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198004#M37069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;array charfield (*) &amp;amp;charfields:;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array charfield (*) $ &amp;amp;charfields;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198004#M37069</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2015-06-02T15:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198005#M37070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... and, for a macro which calls a macro, &lt;/P&gt;&lt;P&gt;this replaces your call execute step;&lt;/P&gt;&lt;P&gt;see&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/Macro_CallMacr" title="http://www.sascommunity.org/wiki/Macro_CallMacr"&gt;Macro CallMacr - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198005#M37070</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2015-06-02T15:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198006#M37071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The specification of the array variable list with the added colon : is probably not doing what you think and or what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;array charfield (*) &amp;amp;charfieldlist&lt;STRONG&gt;:&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If CHARFIELDLIST is CHAR1 CHAR3 then you are asking for variables CHAR1 and all variable that begin with CHAR3.&amp;nbsp; I think if you remove that colon your problem will be solved.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198006#M37071</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-06-02T15:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Macro interpreting array incorrectly</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198007#M37072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This solved the issue, I probably copied this from another line somewhere and accidentally retained the colon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 16:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-interpreting-array-incorrectly/m-p/198007#M37072</guid>
      <dc:creator>lbarwick</dc:creator>
      <dc:date>2015-06-02T16:36:09Z</dc:date>
    </item>
  </channel>
</rss>

