<?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: Getting error message on SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507956#M136375</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to sort your data first&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use Notsorted option with By statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   by HCN REG_TM notsorted;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Oct 2018 06:36:01 GMT</pubDate>
    <dc:creator>singhsahab</dc:creator>
    <dc:date>2018-10-27T06:36:01Z</dc:date>
    <item>
      <title>Getting error message on SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507873#M136344</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data stroke_onset;&lt;BR /&gt;set EVT.stroke_ischemic;&lt;BR /&gt;by HCN REG_TM;&lt;BR /&gt;where REG_TM &amp;lt;= ADM_TM;&lt;BR /&gt;if last.HCN;&lt;BR /&gt;Window1=(REG_TM-SP340_ONSET)/60;&lt;BR /&gt;length cat $100.;&lt;BR /&gt;if 0&amp;lt;=Window1&amp;lt;360 then cat="0to6";&lt;BR /&gt;else if 360&amp;lt;=Window1&amp;lt;2880 then cat="6to48";&lt;BR /&gt;else if 2880&amp;lt;=Window1&amp;lt;7200 then cat = "&amp;gt;=48";&lt;BR /&gt;else if missing (SP340_ONSET) then cat = "onset time missing";&lt;BR /&gt;else if SP340_ONSET&amp;gt;= REG_TM then cat = "Stroke onset equal to and after Reg time";&lt;BR /&gt;else cat='NA';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;I get the following error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: BY variables are not properly sorted on data set EVT.STROKE_ISCHEMIC.&lt;BR /&gt;HCN=0132045842 CIHI_KEY_NACRS=539852017100006511 CIHI_KEY_DAD=5144420171005013&lt;BR /&gt;REG_TM=16JAN2018:16:49:00 ADM_TM=16JAN2018:17:44:00 DISCH_TM=19JAN2018:09:45:00&lt;BR /&gt;FIRST_ADM_TM=16JAN2018:16:49:00 FIRST_ADM_DT=16JAN2018 FIRST_INST=3985 FIRST_FAC=852&lt;BR /&gt;FIRST_FAC_NAME=St Michael's Hospital SP340_FIELD=YNN01160000N201801161430 SP340_TIME=201801161430&lt;BR /&gt;SP340_MON=JAN SP340_ONSET=16JAN2018:14:30:00 SP340_FLAG=1 SP340_VALID=1 DEATH_DT=.&lt;BR /&gt;STROKE_MORTALITY30=0 FIRST.HCN=1 LAST.HCN=1 FIRST.REG_TM=1 LAST.REG_TM=1 Window1=. cat= _ERROR_=1&lt;BR /&gt;_N_=68&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;40 at 2426:16&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 69 observations read from the data set EVT.STROKE_ISCHEMIC.&lt;BR /&gt;WHERE REG_TM&amp;lt;=ADM_TM;&lt;BR /&gt;WARNING: The data set WORK.STROKE_ONSET may be incomplete. When this step was stopped there were 62&lt;BR /&gt;observations and 21 variables.&lt;BR /&gt;WARNING: Data set WORK.STROKE_ONSET was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.85 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 19:31:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507873#M136344</guid>
      <dc:creator>Ranjeeta</dc:creator>
      <dc:date>2018-10-26T19:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error message on SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507876#M136345</link>
      <description>You need to sort your data. Add a PROC SORT before this step and your BY statements in the two PROCS should match. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Oct 2018 19:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507876#M136345</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-26T19:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error message on SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507956#M136375</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to sort your data first&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use Notsorted option with By statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   by HCN REG_TM notsorted;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Oct 2018 06:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-error-message-on-SAS/m-p/507956#M136375</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-10-27T06:36:01Z</dc:date>
    </item>
  </channel>
</rss>

