<?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: Finding the maximum value of a group of macro variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-minimum-value-of-a-group-of-macro-variables/m-p/801469#M315424</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let maxval = %sysfunc(max(&amp;amp;a, &amp;amp;b, &amp;amp;c, &amp;amp;d));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please edit the Subject line on your ORIGINAL post so that it refers to maximum, and not minimum. Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 19:18:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-03-10T19:18:56Z</dc:date>
    <item>
      <title>Finding the minimum value of a group of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-minimum-value-of-a-group-of-macro-variables/m-p/801467#M315422</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find out if there is a simple way to get the min or max of a group of macro variables containing numeric values. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let a = 5;&lt;/P&gt;&lt;P&gt;%let b = 7;&lt;/P&gt;&lt;P&gt;%let c = 6;&lt;/P&gt;&lt;P&gt;%let d = 9;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes the value of one of these variables may change and I would like to always keep track of which has the maximum value, something like a macro version of min or max like %let maxval = %max(&amp;amp;a, &amp;amp;b, &amp;amp;c, &amp;amp;d);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These macro variable values contain the number of "value pairs" in different datasets, and by knowing the maximum number I can dynamically create enough columns for a combined report. Any suggestions would be helpful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-minimum-value-of-a-group-of-macro-variables/m-p/801467#M315422</guid>
      <dc:creator>blarue64</dc:creator>
      <dc:date>2022-03-10T19:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value of a group of macro variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-the-minimum-value-of-a-group-of-macro-variables/m-p/801469#M315424</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let maxval = %sysfunc(max(&amp;amp;a, &amp;amp;b, &amp;amp;c, &amp;amp;d));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please edit the Subject line on your ORIGINAL post so that it refers to maximum, and not minimum. Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-the-minimum-value-of-a-group-of-macro-variables/m-p/801469#M315424</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T19:18:56Z</dc:date>
    </item>
  </channel>
</rss>

