<?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: Categorizing missing values and a range of values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879345#M347397</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am new on SAS community. I am preparing for SAS base certification and I came across this question ( I am expected to fix the errors on this code and run the program).&lt;/P&gt;&lt;P&gt;I have used the example someone posted on this community yet I am still getting errors in my code.&lt;/P&gt;&lt;P&gt;This is the code.&lt;/P&gt;&lt;P&gt;data work.lowchol work.highchol;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if cholesterol lt 200 output work.lowchol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cholesterol ge 200 output work.highchol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cholesterol is missing output work.misschol;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2023 14:18:39 GMT</pubDate>
    <dc:creator>Rebecca7</dc:creator>
    <dc:date>2023-06-06T14:18:39Z</dc:date>
    <item>
      <title>Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725010#M225133</link>
      <description>&lt;P&gt;I am wanting to categorize data within 2 ranges, what happens is they all result in missing or the missing data is wrongfully categorized. this is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;data new;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;set old;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;if WHt='.' then Obese1=.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else if&amp;nbsp; Wht&amp;lt; 30 then Obese1="N"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else Obese1="Y";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;results in this warning over and over again and every row in the data under Obese1 resulting with '.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;103:17 103:34 107:9 108:34 109:18 118:4&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Variable un is uninitialized.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Invalid numeric data, 'N' , at line 108 column 34.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;race_eth=Hispanic (any race) ID=2012000176 MotherHeight=05:07 PriorWeight=170 PREV_ALIVE=2 RFDiabGest= EstGest=39 EstGestOb=&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;EstGestClin=True Plurality=1 MatEthnicity=210 MatRace=01 M_AGE=31 GestDiab=N prev_alive2=2 Ht_Inches=67 PRiorweight2=170&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;BMI=26.698596569 ObesePrior=. un=. Preterm=N _ERROR_=1 _N_=1&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Invalid numeric data, 'Y' , at line 109 column 18.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;race_eth=Hispanic (any race) ID=2012000324 MotherHeight=05:02 PriorWeight=220 PREV_ALIVE=1 RFDiabGest=True EstGest=38 EstGestOb=True&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;EstGestClin= Plurality=1 MatEthnicity=280 MatRace=01 M_AGE=32 GestDiab=Y prev_alive2=1 Ht_Inches=62 PRiorweight2=220&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;BMI=40.348595213 ObesePrior=. un=. Preterm=N _ERROR_=1 _N_=2&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;When I rearrange the code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;if Wht &amp;lt; 30 then Obese1="N"; else if Wht='.' then Obese1=.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else Obese1="Y";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are no warnings or errors, BUT, the the missing 'Wht" data are categorized as "N" in the Obese1 column.&lt;/P&gt;&lt;P&gt;what is happening here?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 23:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725010#M225133</guid>
      <dc:creator>Cooksam13</dc:creator>
      <dc:date>2021-03-09T23:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725020#M225134</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/347594"&gt;@Cooksam13&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am wanting to categorize data within 2 ranges, what happens is they all result in missing or the missing data is wrongfully categorized. this is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;data new;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;set old;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;if WHt='.' then Obese1=.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else if&amp;nbsp; Wht&amp;lt; 30 then Obese1="N"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else Obese1="Y";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;results in this warning over and over again and every row in the data under Obese1 resulting with '.'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;103:17 103:34 107:9 108:34 109:18 118:4&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Variable un is uninitialized.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Invalid numeric data, 'N' , at line 108 column 34.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;race_eth=Hispanic (any race) ID=2012000176 MotherHeight=05:07 PriorWeight=170 PREV_ALIVE=2 RFDiabGest= EstGest=39 EstGestOb=&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;EstGestClin=True Plurality=1 MatEthnicity=210 MatRace=01 M_AGE=31 GestDiab=N prev_alive2=2 Ht_Inches=67 PRiorweight2=170&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;BMI=26.698596569 ObesePrior=. un=. Preterm=N _ERROR_=1 _N_=1&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&lt;FONT color="#FF0000"&gt;NOTE: Invalid numeric data, 'Y' , at line 109 column 18.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;race_eth=Hispanic (any race) ID=2012000324 MotherHeight=05:02 PriorWeight=220 PREV_ALIVE=1 RFDiabGest=True EstGest=38 EstGestOb=True&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;EstGestClin= Plurality=1 MatEthnicity=280 MatRace=01 M_AGE=32 GestDiab=Y prev_alive2=1 Ht_Inches=62 PRiorweight2=220&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&lt;FONT color="#FF0000"&gt;BMI=40.348595213 ObesePrior=. un=. Preterm=N _ERROR_=1 _N_=2&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;When I rearrange the code:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;if Wht &amp;lt; 30 then Obese1="N"; else if Wht='.' then Obese1=.;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;else Obese1="Y";&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there are no warnings or errors, BUT, the the missing 'Wht" data are categorized as "N" in the Obese1 column.&lt;/P&gt;
&lt;P&gt;what is happening here?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Copy the entire log including the data step code when you have questions about anything in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case: WHT does not exist in your data. I know that because this error message:&lt;/P&gt;
&lt;PRE&gt;NOTE: Invalid numeric data, 'N' , at line 108 column 34.
race_eth=Hispanic (any race) ID=2012000176 MotherHeight=05:07 PriorWeight=170 PREV_ALIVE=2 RFDiabGest= EstGest=39 EstGestOb=
EstGestClin=True Plurality=1 MatEthnicity=210 MatRace=01 M_AGE=31 GestDiab=N prev_alive2=2 Ht_Inches=67 PRiorweight2=170
BMI=26.698596569 ObesePrior=. un=. Preterm=N _ERROR_=1 _N_=1&lt;/PRE&gt;
&lt;P&gt;includes the values of every single variable assigned at the time the error occurs. You also have no variable named Obese1.&lt;/P&gt;
&lt;P&gt;Your code does not show a variable UN used, but the cause would be listing a variable in a statement but not assigning a value to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do not test numeric variable for missing with a '.' , quoted period. That is a character variable. Do not test character variables for missing with '.' either because that is an actual value. Better is to use the MISSING function since it works with both types of variables:&lt;/P&gt;
&lt;PRE&gt;if missing(somevariablename) then do &amp;lt;whatever&amp;gt;;&lt;/PRE&gt;
&lt;P&gt;Missing values are less than any value. So if Var has a missing value : Var &amp;lt; 30 is true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You cannot assign character values, i.e. 'Y' or 'N' to numeric variables. You can determine the characteristics for your variables by running:&lt;/P&gt;
&lt;PRE&gt;Proc contents data=&amp;lt;yourdatasetname&amp;gt;;
run;&lt;/PRE&gt;
&lt;P&gt;If this shows the variable a numeric but you see Y and N, then that means a Format has been assigned that will show up in the Proc Contents. You will need to assign the numeric value associated with the format. At a guess 1 =Y and 0 is N but other codes may be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 00:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725020#M225134</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-10T00:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725021#M225135</link>
      <description>&lt;P&gt;Sorry for the confusion, I changed "BMI" to Wht and "ObesePrior" to Obese1 in the question to appease to my professor in not including exact code&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 00:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725021#M225135</guid>
      <dc:creator>Cooksam13</dc:creator>
      <dc:date>2021-03-10T00:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725022#M225136</link>
      <description>&lt;P&gt;I did your suggestion&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if missing(BMI) then ObesePrior=.;&lt;BR /&gt;else if BMI &amp;lt; 30 then ObesePrior="N"; &lt;BR /&gt;else ObesePrior= 'Y';&lt;/PRE&gt;&lt;P&gt;and I got the same error&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 01:00:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725022#M225136</guid>
      <dc:creator>Cooksam13</dc:creator>
      <dc:date>2021-03-10T01:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725025#M225139</link>
      <description>&lt;P&gt;Your first statement starts you off on the wrong path.&amp;nbsp; Using a . as the value is the correct way to refer to a missing value for a numeric variable.&amp;nbsp; However, since you want ObesePrior to be a character value taking on values like "Y" and "N", change the code to make it a character variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if missing(BMI) then ObesePrior=" ";
else if BMI &amp;lt; 30 then ObesePrior="N"; 
else ObesePrior= 'Y';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Mar 2021 02:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/725025#M225139</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-03-10T02:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879345#M347397</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I am new on SAS community. I am preparing for SAS base certification and I came across this question ( I am expected to fix the errors on this code and run the program).&lt;/P&gt;&lt;P&gt;I have used the example someone posted on this community yet I am still getting errors in my code.&lt;/P&gt;&lt;P&gt;This is the code.&lt;/P&gt;&lt;P&gt;data work.lowchol work.highchol;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sashelp.heart;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if cholesterol lt 200 output work.lowchol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cholesterol ge 200 output work.highchol;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cholesterol is missing output work.misschol;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 14:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879345#M347397</guid>
      <dc:creator>Rebecca7</dc:creator>
      <dc:date>2023-06-06T14:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879347#M347398</link>
      <description>&lt;P&gt;Probably best to start a new thread. Also, when you get errors in the log, show us the ENTIRE log (not just the error messages).&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 14:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879347#M347398</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-06T14:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Categorizing missing values and a range of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879978#M347643</link>
      <description>&lt;DIV class=""&gt;1) When I did a proc print of the initial dataset given, it looped and turned forever and when it finally stopped it gave me the above log.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;72&lt;/DIV&gt;&lt;DIV class=""&gt;73 data xyz;&lt;/DIV&gt;&lt;DIV class=""&gt;74 set sashelp.heart;&lt;/DIV&gt;&lt;DIV class=""&gt;75 run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: There were 5209 observations read from the data set SASHELP.HEART.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The data set WORK.XYZ has 5209 observations and 17 variables.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 2330.21k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 28332.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 09/06/2023 10:18:11 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 60 Switch Count 2&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;2) When i tried to categorize the dataset into 3 categories using if- then-else statement, then followed by a proc sort statement. This is what i got in the log.&lt;/DIV&gt;&lt;DIV class=""&gt;, but i got my output, and well categorized.&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;72&lt;/DIV&gt;&lt;DIV class=""&gt;73&lt;/DIV&gt;&lt;DIV class=""&gt;74 data work.lowchol work.highchol;&lt;/DIV&gt;&lt;DIV class=""&gt;75 set sashelp.heart;&lt;/DIV&gt;&lt;DIV class=""&gt;76 if cholesterol &amp;lt; 200 then output = 'work.lowchol';&lt;/DIV&gt;&lt;DIV class=""&gt;77 else if cholesterol ge 200 then output = 'work.highchol';&lt;/DIV&gt;&lt;DIV class=""&gt;78 else if cholesterol = '.' then output = 'work.misschol';&lt;/DIV&gt;&lt;DIV class=""&gt;79 run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/DIV&gt;&lt;DIV class=""&gt;78:26&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: There were 5209 observations read from the data set SASHELP.HEART.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The data set WORK.LOWCHOL has 5209 observations and 18 variables.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The data set WORK.HIGHCHOL has 5209 observations and 18 variables.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 3835.15k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 31408.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 09/06/2023 10:29:25 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 96 Switch Count 4&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Reclaims 690&lt;/DIV&gt;&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class=""&gt;Voluntary Context Switches 23&lt;/DIV&gt;&lt;DIV class=""&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Output Operations 4120&lt;/DIV&gt;&lt;DIV class=""&gt;3) When i tried to do a proc print of the data that i categorized and sorted so i could answer the questions that followed. I did not get any result for the proc print but this is what i got in the log.&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;72&lt;/DIV&gt;&lt;DIV class=""&gt;73 proc sort data = work.lowchol work.highchol;&lt;/DIV&gt;&lt;DIV class=""&gt;_____________&lt;/DIV&gt;&lt;DIV class=""&gt;22&lt;/DIV&gt;&lt;DIV class=""&gt;201&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, ASCII, BUFFNO, DANISH, DATA, DATECOPY, DETAILS, DIAG, DUPOUT,&lt;/DIV&gt;&lt;DIV class=""&gt;EBCDIC, EQUALS, FINNISH, FORCE, IN, ISA, L, LEAVE, LIST, MESSAGE, MSG, NATIONAL, NODUP, NODUPKEY, NODUPKEYS,&lt;/DIV&gt;&lt;DIV class=""&gt;NODUPLICATE, NODUPLICATES, NODUPREC, NODUPRECS, NODUPS, NOEQUALS, NORWEGIAN, NOTHREADS, NOUNIKEY, NOUNIKEYS,&lt;/DIV&gt;&lt;DIV class=""&gt;NOUNIQUEKEY, NOUNIQUEKEYS, NOUNIQUEREC, NOUNIQUERECS, NOUNIREC, NOUNIRECS, OSA, OUT, OVERWRITE, PAGESIZE, PRESORTED,&lt;/DIV&gt;&lt;DIV class=""&gt;PSIZE, REVERSE, SIZE, SORTSEQ, SORTSIZE, SORTWKNO, SWEDISH, T, TAGSORT, TECH, TECHNIQUE, TESTHSI, THREADS, UNIOUT,&lt;/DIV&gt;&lt;DIV class=""&gt;UNIQUEOUT, WKNO, WORKNO.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 201-322: The option is not recognized and will be ignored.&lt;/DIV&gt;&lt;DIV class=""&gt;74 by output;&lt;/DIV&gt;&lt;DIV class=""&gt;75 run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 1354.84k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 28840.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 09/06/2023 10:34:52 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 103 Switch Count 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Reclaims 247&lt;/DIV&gt;&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class=""&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Output Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;76 proc print data = work.lowchol work.highchol;&lt;/DIV&gt;&lt;DIV class=""&gt;_____________&lt;/DIV&gt;&lt;DIV class=""&gt;22&lt;/DIV&gt;&lt;DIV class=""&gt;201&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL,&lt;/DIV&gt;&lt;DIV class=""&gt;GRANDTOT_LABEL, GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT,&lt;/DIV&gt;&lt;DIV class=""&gt;STYLE, SUMLABEL, UNIFORM, WIDTH.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 201-322: The option is not recognized and will be ignored.&lt;/DIV&gt;&lt;DIV class=""&gt;77 run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 1405.15k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 28840.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 09/06/2023 10:34:52 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 104 Switch Count 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Reclaims 252&lt;/DIV&gt;&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class=""&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Output Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;78&lt;/DIV&gt;&lt;DIV class=""&gt;79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;80&lt;/DIV&gt;&lt;DIV class=""&gt;81 proc sort data = work.lowchol work.highchol;&lt;/DIV&gt;&lt;DIV class=""&gt;_____________&lt;/DIV&gt;&lt;DIV class=""&gt;22&lt;/DIV&gt;&lt;DIV class=""&gt;201&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, ASCII, BUFFNO, DANISH, DATA, DATECOPY, DETAILS, DIAG, DUPOUT,&lt;/DIV&gt;&lt;DIV class=""&gt;EBCDIC, EQUALS, FINNISH, FORCE, IN, ISA, L, LEAVE, LIST, MESSAGE, MSG, NATIONAL, NODUP, NODUPKEY, NODUPKEYS,&lt;/DIV&gt;&lt;DIV class=""&gt;NODUPLICATE, NODUPLICATES, NODUPREC, NODUPRECS, NODUPS, NOEQUALS, NORWEGIAN, NOTHREADS, NOUNIKEY, NOUNIKEYS,&lt;/DIV&gt;&lt;DIV class=""&gt;NOUNIQUEKEY, NOUNIQUEKEYS, NOUNIQUEREC, NOUNIQUERECS, NOUNIREC, NOUNIRECS, OSA, OUT, OVERWRITE, PAGESIZE, PRESORTED,&lt;/DIV&gt;&lt;DIV class=""&gt;PSIZE, REVERSE, SIZE, SORTSEQ, SORTSIZE, SORTWKNO, SWEDISH, T, TAGSORT, TECH, TECHNIQUE, TESTHSI, THREADS, UNIOUT,&lt;/DIV&gt;&lt;DIV class=""&gt;UNIQUEOUT, WKNO, WORKNO.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 201-322: The option is not recognized and will be ignored.&lt;/DIV&gt;&lt;DIV class=""&gt;82 by output;&lt;/DIV&gt;&lt;DIV class=""&gt;83 run;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;/DIV&gt;&lt;DIV class=""&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;user cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class=""&gt;memory 1356.71k&lt;/DIV&gt;&lt;DIV class=""&gt;OS Memory 29608.00k&lt;/DIV&gt;&lt;DIV class=""&gt;Timestamp 09/06/2023 10:29:25 PM&lt;/DIV&gt;&lt;DIV class=""&gt;Step Count 97 Switch Count 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class=""&gt;Page Reclaims 241&lt;/DIV&gt;&lt;DIV class=""&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class=""&gt;Voluntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Involuntary Context Switches 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;Block Output Operations 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;84&lt;/DIV&gt;&lt;DIV class=""&gt;85 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;3) When i tried to do a proc sort of the data i categorized above, i could see values for work.lowchol&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Categorizing-missing-values-and-a-range-of-values/m-p/879978#M347643</guid>
      <dc:creator>Rebecca7</dc:creator>
      <dc:date>2023-06-09T22:38:34Z</dc:date>
    </item>
  </channel>
</rss>

