<?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: Score bands in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761360#M240923</link>
    <description>Thanks a lot Reeza!</description>
    <pubDate>Fri, 13 Aug 2021 07:11:57 GMT</pubDate>
    <dc:creator>Solly7</dc:creator>
    <dc:date>2021-08-13T07:11:57Z</dc:date>
    <item>
      <title>Score bands</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761130#M240795</link>
      <description>&lt;P&gt;Hi, I need help in allocating score bands to outbound and inbound users based on their QA_Score from &lt;STRONG&gt;retentions&lt;/STRONG&gt; table, please note that the last two users&amp;nbsp;&lt;STRONG&gt;FDANISA and&amp;nbsp;FFARAO&amp;nbsp;&lt;/STRONG&gt;need to be allocated only&amp;nbsp;&lt;STRONG&gt;outbound_save_band&lt;/STRONG&gt; values and first 3 users needs to be only allocated the&amp;nbsp;&lt;STRONG&gt;inbound_save_band&lt;/STRONG&gt; value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data retentions;
  input QA_score user $20.;
  datalines;
114 ALUPIYA 
130 DLOUIS 
150 DMORAKE 
100 FDANISA 
122 FFARAO   
;

proc format;
invalue inbound_save_band
low -&amp;lt; 114 = 0
114 -&amp;lt; 137 = 0.08
137 -&amp;lt; 152 = 0.16
152 -&amp;lt; 167 = 0.24
167 -&amp;lt; 190 = 0.32
190 - high = 0.4
;
run;

proc format;
invalue outbound_save_band
low -&amp;lt; 82 = 0
82 -&amp;lt; 98 = 0.08
98 -&amp;lt; 109 = 0.16
109 -&amp;lt; 120 = 0.24
120 -&amp;lt; 136 = 0.32
136 - high = 0.4
;
run;&lt;/LI-CODE&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;&lt;STRONG&gt;data want&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;QA_Score&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;user&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inbound_outbound_score&lt;/P&gt;
&lt;P&gt;114&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALUPIYA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;130&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DLOUIS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.08&lt;/P&gt;
&lt;P&gt;150&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DMORAKE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.16&lt;/P&gt;
&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FDANISA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.16&lt;/P&gt;
&lt;P&gt;122&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FFARAO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.32&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 12:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761130#M240795</guid>
      <dc:creator>Solly7</dc:creator>
      <dc:date>2021-08-12T12:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Score bands</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761140#M240798</link>
      <description>&lt;P&gt;For something like this, you'll need to put some kind of flag or indicator in the data which can be used to determine whether inbound or outbound will apply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would adjust your code as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data retentions;
  input QA_score user : $20. Band_Indicator $;
  datalines;
114 ALUPIYA I
130 DLOUIS I
150 DMORAKE I
100 FDANISA O
122 FFARAO O
;
RUN;

proc format;
invalue inbound_save_band
low -&amp;lt; 114 = 0
114 -&amp;lt; 137 = 0.08
137 -&amp;lt; 152 = 0.16
152 -&amp;lt; 167 = 0.24
167 -&amp;lt; 190 = 0.32
190 - high = 0.4
;
run;

proc format;
invalue outbound_save_band
low -&amp;lt; 82 = 0
82 -&amp;lt; 98 = 0.08
98 -&amp;lt; 109 = 0.16
109 -&amp;lt; 120 = 0.24
120 -&amp;lt; 136 = 0.32
136 - high = 0.4
;
run;

DATA	Want;
	SET	Retentions;
	IF	UPCASE(Band_Indicator)	=	'I'	THEN
		Inbound_Outbound_Score	=	INPUT(PUT(QA_Score, 3.), Inbound_Save_Band3.);
	ELSE
	IF	UPCASE(Band_Indicator)	=	'O'	THEN
		Inbound_Outbound_Score	=	INPUT(PUT(QA_Score, 3.), Outbound_Save_Band3.);
	ELSE
		CALL	MISSING(Inbound_Outbound_Score);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1628777632646.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62514iB8226DBC92EA7222/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1628777632646.png" alt="jimbarbour_0-1628777632646.png" /&gt;&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;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 14:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761140#M240798</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-08-12T14:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Score bands</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761188#M240817</link>
      <description>&lt;P&gt;Slight modification on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37107"&gt;@jimbarbour&lt;/a&gt;&amp;nbsp;solution to use INPUTN.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA	Want;
	SET	Retentions;
	length fmt $32.;
	IF	UPCASE(Band_Indicator)	=	'I'	THEN fmt = "Inbound_save_band";
	ELSE IF	UPCASE(Band_Indicator)	=	'O'	THEN fmt = "outbound_save_band";
       *any other cases you need to deal with?;
       ELSE ....;
   
		
    Inbound_Outbound_Score	=	INPUTN(PUT(QA_Score, 3.), fmt);

RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Aug 2021 16:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761188#M240817</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-12T16:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Score bands</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761359#M240922</link>
      <description>Thanks a lot Jim...you really saved me!!</description>
      <pubDate>Fri, 13 Aug 2021 07:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761359#M240922</guid>
      <dc:creator>Solly7</dc:creator>
      <dc:date>2021-08-13T07:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Score bands</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761360#M240923</link>
      <description>Thanks a lot Reeza!</description>
      <pubDate>Fri, 13 Aug 2021 07:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Score-bands/m-p/761360#M240923</guid>
      <dc:creator>Solly7</dc:creator>
      <dc:date>2021-08-13T07:11:57Z</dc:date>
    </item>
  </channel>
</rss>

