<?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: To return the maximun in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402082#M97604</link>
    <description>&lt;P&gt;Use max function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max_CIWA=max(of&amp;nbsp;CIWA: );&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Oct 2017 14:18:58 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2017-10-07T14:18:58Z</dc:date>
    <item>
      <title>To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402081#M97603</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello I wish to to return&amp;nbsp; the maximum of&amp;nbsp;,&amp;nbsp;&lt;SPAN&gt;CIWA_Score1,&amp;nbsp;&amp;nbsp;CIWA_Score2,&amp;nbsp;&amp;nbsp;CIWA_Score3,&amp;nbsp;&amp;nbsp;CIWA_Score4 as "Max_CIWA".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My data has _1_CIWA_Score,&amp;nbsp; _2_CIWA_Score,&amp;nbsp; _3_CIWA_Score,&amp;nbsp; _4_CIWA_Score. Can any one help?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="377"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;_1_CIWA_Score&lt;/TD&gt;
&lt;TD width="64"&gt;_2_CIWA_Score&lt;/TD&gt;
&lt;TD width="64"&gt;_3_CIWA_Score&lt;/TD&gt;
&lt;TD width="64"&gt;_4_CIWA_Score4&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;Max_CIWA&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;7&lt;/TD&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;1&lt;/TD&gt;
&lt;TD width="64"&gt;6&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;1&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;5&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;1&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;17&lt;/TD&gt;
&lt;TD width="64"&gt;7&lt;/TD&gt;
&lt;TD width="64"&gt;5&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;17&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;3&lt;/TD&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;2&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;4&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="64"&gt;.&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;1&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="64"&gt;0&lt;/TD&gt;
&lt;TD width="121"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402081#M97603</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2017-10-07T14:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402082#M97604</link>
      <description>&lt;P&gt;Use max function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Max_CIWA=max(of&amp;nbsp;CIWA: );&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402082#M97604</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-10-07T14:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402083#M97605</link>
      <description>&lt;P&gt;665 data BH_New;&lt;BR /&gt;1666 set BH_New;&lt;BR /&gt;1667 CIWA_Score=max(of _1_CIWA_Score -_4_CIWA_Score);&lt;BR /&gt; ---&lt;BR /&gt; 71&lt;BR /&gt;ERROR: Missing numeric suffix on a numbered variable list (_1_CIWA_Score-_4_CIWA_Score).&lt;BR /&gt;ERROR 71-185: The MAX function call does not have enough arguments.&lt;/P&gt;
&lt;P&gt;1668 run;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402083#M97605</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2017-10-07T14:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402084#M97606</link>
      <description>&lt;P&gt;works!!!!!!!!!!!!!!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;690 data BH_New;&lt;BR /&gt;1691 set BH_New;&lt;BR /&gt;1692 CIWA_Score=Max(of _1_CIWA_Score, _2_CIWA_Score, _3_CIWA_Score, _4_CIWA_Score);&lt;BR /&gt;1693 run;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402084#M97606</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2017-10-07T14:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402086#M97607</link>
      <description>&lt;P&gt;I believe your challenge here is related to the variable naming convention.&amp;nbsp; The '-' is used when a numeric indicator is at the end of a variable name (for example x1,x2,x3,x4), but not when it is internale to the name (x1_dat, x2_dat, x3_dat).&amp;nbsp; What you can do, assuming that the variables are in this order on the program data vector (PDV) is use a double dash '--'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case, _1_CIWA_Score --_4_CIWA_Score.&amp;nbsp; This will include any variable in the DATA step created between the first introduction of _1_CIWA_Score&amp;nbsp; and the&amp;nbsp; first introduction of _4_CIWA_Score.&amp;nbsp; If you view the DATA set and these variable appear together as a group with _1_CIWA_Score appearing first and _4_CIWA_Score appearing as the last, you will be fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 14:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402086#M97607</guid>
      <dc:creator>johndschmitz</dc:creator>
      <dc:date>2017-10-07T14:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402095#M97608</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40563"&gt;@desireatem&lt;/a&gt;&amp;nbsp; I think it is unethical to mark your own answers as correct after seeking help on the forum and having got couple of suggestions. That's poor sport and so unprofessional.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 16:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402095#M97608</guid>
      <dc:creator>Andygray</dc:creator>
      <dc:date>2017-10-07T16:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402107#M97615</link>
      <description>&lt;P&gt;You are right. But some1 who is not registered corrected it and I paste it.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 18:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402107#M97615</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2017-10-07T18:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: To return the maximun</title>
      <link>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402108#M97616</link>
      <description>&lt;P&gt;so if I found the solution I shouldn't paste it. That is not what I was taught.&amp;nbsp; sorry after a second thought I disagree with you Andyx.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2017 18:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/To-return-the-maximun/m-p/402108#M97616</guid>
      <dc:creator>desireatem</dc:creator>
      <dc:date>2017-10-07T18:19:12Z</dc:date>
    </item>
  </channel>
</rss>

