<?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 What is the effect of having notsorted option when data set is actually sorted? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102398#M28663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi SAS Forum,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;I am going to apply this DoW loop to a data set (just a small part of sample data set is shown).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; last_start_npna;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;(last.account_number);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; set_2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: yellow; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: black; font-size: 11pt;"&gt; bank_number account_number arrears_band&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;notsorted&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; first.Arrears_band &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Arrears_band=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'NPNA'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Last_NPNA_Start_Month = Current_Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Last_NPNA_Start_Month &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; bank_number account_number Last_NPNA_Start_month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Current_date Bank_number Account_number Balance product Arrears_Band (these are variable headings)&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: #4f493b 1pt solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;28FEB2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;30APR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAY2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;2222222222&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;25&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Current&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;30APR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;2222222222&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;25&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Current&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: fuchsia; color: black; font-size: 11pt;"&gt;Question:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;I have actually sorted the dataset exactly by the set of “by variables’ shown in the code above (yellow).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: black; font-size: 11pt;"&gt;Proc sort data= set_2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="font-family: Courier; background: yellow; color: black; font-size: 10pt;"&gt;by bank_number account_number arrears_band;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier; background: yellow; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Would then having the&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt; notsorted&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; option harm my final results. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;In fact, I Have run with and without &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;notsorted &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;option and both scenarios produce same results but I doubt if SAS has given me correct results for wrong reasons.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Could anyone shed some light?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Oct 2012 21:18:29 GMT</pubDate>
    <dc:creator>Mirisage</dc:creator>
    <dc:date>2012-10-21T21:18:29Z</dc:date>
    <item>
      <title>What is the effect of having notsorted option when data set is actually sorted?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102398#M28663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Hi SAS Forum,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;I am going to apply this DoW loop to a data set (just a small part of sample data set is shown).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; last_start_npna;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;until&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;(last.account_number);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; set_2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: yellow; color: blue; font-size: 11pt;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: black; font-size: 11pt;"&gt; bank_number account_number arrears_band&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;notsorted&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; first.Arrears_band &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Arrears_band=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'NPNA'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Last_NPNA_Start_Month = Current_Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Last_NPNA_Start_Month &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;date9.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; bank_number account_number Last_NPNA_Start_month;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;Current_date Bank_number Account_number Balance product Arrears_Band (these are variable headings)&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: #4f493b 1pt solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;28FEB2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;30APR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAY2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;1111111111&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;45&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;NPNA&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;31MAR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;2222222222&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;25&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Current&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;30APR2010&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;2222222222&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;25&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Personal Loan&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" valign="top"&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Times New Roman';"&gt;Current&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: fuchsia; color: black; font-size: 11pt;"&gt;Question:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;I have actually sorted the dataset exactly by the set of “by variables’ shown in the code above (yellow).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: yellow; color: black; font-size: 11pt;"&gt;Proc sort data= set_2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="font-family: Courier; background: yellow; color: black; font-size: 10pt;"&gt;by bank_number account_number arrears_band;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier; background: yellow; color: black; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;Would then having the&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt; notsorted&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; option harm my final results. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;In fact, I Have run with and without &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;notsorted &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;option and both scenarios produce same results but I doubt if SAS has given me correct results for wrong reasons.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Could anyone shed some light?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; font-size: 11pt;"&gt;Mirisage&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 21:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102398#M28663</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-10-21T21:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the effect of having notsorted option when data set is actually sorted?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102399#M28664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Notsorted is used when your data is GROUPED but not necessarily in a sorted order, as below. If your said BY using that structure without the notsorted option SAS would say it wasn't in order. If it is sorted then you don't need the notsorted option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 22:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102399#M28664</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-10-21T22:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: What is the effect of having notsorted option when data set is actually sorted?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102400#M28665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't have any adverse effect on the results, but may affect performance.&amp;nbsp; According to the documentation:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, 'Arial Unicode MS', geneva, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;notsorted: specifies that observations with the same BY value are grouped together but are not necessarily sorted in alphabetical or numeric order.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2012 22:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-the-effect-of-having-notsorted-option-when-data-set-is/m-p/102400#M28665</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-21T22:26:32Z</dc:date>
    </item>
  </channel>
</rss>

