<?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: Syntax Help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424954#M104652</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184864"&gt;@michshoot&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello to all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how do I do if I have a sex-dependent variable?&lt;BR /&gt;wbc for women (sex = 0) its range is from 370 to 500 the values out of the range become 0 inside equal to 1, for males (sex = 1) their range goes from 410 to 540 values out of the range become o and inside 1.&lt;BR /&gt;&lt;BR /&gt;should the output be 0 and 1 in a single variable?&lt;/P&gt;
&lt;P&gt;I tried in the second part of the eg.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1. When recoding I generally place the values into a new variable so that errors of coding are easy to debug.&lt;/P&gt;
&lt;P&gt;2. Often with ranges such as this I create custom formats as then I do not need to modify the data at all and most analysis procedures will use the formatted values as categories UNLESS I have an instance such as you have where the ranges differ by another characteristic such as gender or age.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use logic results to assign 0, 1 such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;   if sex=0 then do;
      wbc = (370 le wbc le 500);
   end;
   else do;
      wbc = (410 le wbc le 540);
   end;
&lt;/PRE&gt;
&lt;P&gt;SAS will assign a value of 1 to "true"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2018 16:01:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-01-04T16:01:21Z</dc:date>
    <item>
      <title>Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424877#M104614</link>
      <description>&lt;P&gt;Hello to all,&lt;BR /&gt;I have a dataset with the variables concerning the blood count.&lt;BR /&gt;I have dichotomized the variables in 0.1.&lt;BR /&gt;how do I do if I have a sex-dependent variable?&lt;BR /&gt;wbc for women (sex = 0) its range is from 370 to 500 the values out of the range become 0 inside equal to 1, for males (sex = 1) their range goes from 410 to 540 values out of the range become o and inside 1.&lt;BR /&gt;should the output be 0 and 1 in a single variable?&lt;/P&gt;
&lt;P&gt;I tried in the second part of the eg.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eg 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datasetdummy;
	set WORK.PPP;

	if Sesso='F' then
		Sesso=0;
	else
		Sesso=1;
	*nuova variabile binaria riguardante il sesso l'ho chiamata sesso (0=donna,1=uomo);

	if Interno='SI' then
		Interno=0;
	else
		Interno=1;
	* interno (si=0,no=1);

	if NEUT &amp;lt;=90 then
		NEUT=0;
	else if NEUT&amp;gt;=450 then
		NEUT=0;
	else
		NEUT=1;
	*se NEUT non si trova tra 90-450 è uguale a 0 altrimenti è uguale a 1;

	if LYMPH &amp;lt;=100 then
		LYMPH=0;
	else if LYMPH&amp;gt;=300 then
		LYMPH=0;
	else
		LYMPH=1;
	*uguale al commento sopra per tutte le variabili MONO EO BASO;

	if MONO &amp;lt;=0 then
		MONO=0;
	else if MONO &amp;gt;=100 then
		MONO=0;
	else
		MONO=1;

	if EO &amp;lt;=0 then
		EO=0;
	else if EO&amp;gt;=40 then
		EO=0;
	else
		EO=1;

	if BASO &amp;lt;=0 then
		BASO=0;
	else if BASO&amp;gt;=5 then
		BASO=0;
	else
		BASO=1;

	if PLT&amp;lt;=130 then
		PLT=0;
	else if PLT&amp;gt;=330 then
		PLT=0;
	else
		PLT=1;

	if MCV&amp;lt;=800 then
		MCV=0;
	else if MCV&amp;gt;=970 then
		MCV=0;
	else
		MCV=1;

	if MCH &amp;lt;=270 then
		MCH=0;
	else if MCH&amp;gt;=340 then
		MCH=0;
	else
		MCH=1;

	if MCHC&amp;lt;=330 then
		MCHC=0;
	else if MCHC&amp;gt;=364 then
		MCHC=0;
	else
		MCHC=1;

	if WBC&amp;lt;=2600 then
		WBC=0;
	else if WBC&amp;gt;=7800 then
		WBC=0;
	else
		WBC=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eg2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsd;
	set datasetdummy;

	if RBC.Sesso=0&amp;lt;=2600 then
		RBC=0;
	else if RBC.Sesso=0&amp;gt;=7800;
else
	RBC.Sesso=0=1;

if RBC.Sesso=1&amp;lt;=2600 then
	RBC=0;
else if RBC.Sesso=1&amp;gt;=7800;
else
	RBC.Sesso=1=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;does anyone know how to implement it? I tried this way !!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 16:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424877#M104614</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424884#M104615</link>
      <description>&lt;P&gt;Its really hard to read that code.&amp;nbsp; First, use the code window - its the {i} above post are, to post code as this retains formatting.&amp;nbsp; Second use some code formatting, i.e. not all mixed case, use indentations etc. Also, provide some test data, otherwise we are just guessing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I can tell here you have variables like NEU, LYMPH etc.&amp;nbsp; Can I ask why?&amp;nbsp; It is pretty much standard now in clinical trials to use CDISC models for the data, including this lab data, so why is it not in LB or ADLB format?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are of course numerous ways to approach this, formats for instance with an if to format for male or female.&amp;nbsp; You could build it all as nestled ifs, e.g:&lt;/P&gt;
&lt;PRE&gt;...
  if sex="Male" then do;
    neut=ifn(90 &amp;lt; neut  &amp;lt; 450,0,1);
    ...
  end;
  else do;
    neut=...

  end;
...&lt;/PRE&gt;
&lt;P&gt;Or you can go the route of creating normal ranges and merging these on.&amp;nbsp; This would be the most normal approach to the problem and its what labs tend to do.&amp;nbsp; They would have a standard dataset with Gender, Age, Lower, Upper Extended Lower, Extended Upper.&amp;nbsp; This dataset is then merged onto the lab data by age and gender to get the normal ranges which are then used to calculate out of range flags.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the CDISC SDTM guidelines, its all there and has been thought out by many in the industry for quite some time.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 11:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424884#M104615</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-04T11:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424888#M104616</link>
      <description>&lt;P&gt;For formatting code like that, you should be chased through SASVille with a priestess ringing a bell and repeatedly shouting "Shame! Shame! Shame!" following you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you unnecessarily complicate your conditions; try this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datasetdummy;
set WORK.PPP;
if Sesso = 'F'
then Sesso = 0;
else Sesso = 1; * nuova variabile binaria riguardante il sesso l'ho chiamata sesso (0=donna,1=uomo);
if Interno = 'SI'
then Interno = 0;
else Interno = 1; * interno (si=0,no=1);
if NEUT &amp;lt;= 90 or NEUT &amp;gt;= 450
then NEUT = 0;
else NEUT = 1; * se NEUT non si trova tra 90-450 è uguale a 0 altrimenti è uguale a 1;
if LYMPH &amp;lt;= 100 or LYMPH &amp;gt;= 300
then LYMPH = 0;
else LYMPH = 1; * uguale al commento sopra per tutte le variabili MONO EO BASO;
if MONO &amp;lt; 0 or MONO &amp;gt;= 100
then MONO = 0;
else MONO = 1;
if EO &amp;lt; 0 or EO &amp;gt;= 40
then EO = 0;
else EO = 1;
if BASO &amp;lt; 0 BASO &amp;gt;= 5
then BASO = 0;
else BASO = 1;
if PLT &amp;lt;= 130 or PLT &amp;gt;= 330
then PLT = 0;
else PLT = 1;
if MCV &amp;lt;= 800 or MCV &amp;gt;= 970
then MCV = 0;
else MCV = 1;
if MCH &amp;lt;= 270 or MCH &amp;gt;= 340
then MCH = 0;
else MCH = 1;
if MCHC &amp;lt;= 330 or MCHC &amp;gt;= 364
then MCHC = 0;
else MCHC = 1;
if WBC &amp;lt;= 2600 or WBC &amp;gt;= 7800
then WBC = 0;
else WBC = 1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit: changed MONO, EO and BASO. &lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424888#M104616</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-04T12:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424889#M104617</link>
      <description>&lt;DIV class="g-unit"&gt;&lt;DIV class=""&gt;&lt;DIV&gt;the data on the blood count I took from a blood machine in Italy, and the parameters are those I'm creating a model to make the logic, however I did not understand how to create the new RBC dichocotoma variable for sex.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Jan 2018 12:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424889#M104617</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424892#M104618</link>
      <description>you did not answer my question?&lt;BR /&gt;how to implement eg 2 !!!&lt;BR /&gt;RBC?&lt;BR /&gt;that however is sas fault there are few online guides !!</description>
      <pubDate>Thu, 04 Jan 2018 12:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424892#M104618</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T12:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424898#M104620</link>
      <description>&lt;P&gt;RBC.Sesso is not a valid SAS name for a variable. Look into the "Columns" section of the dataset properties window or into the output of proc contents to get the real name.&lt;/P&gt;
&lt;P&gt;If that column really has that name because it was imported that way, use 'RBC.Sesso'n as the name in your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To find documentation, do a google search for "sas XXXX", where XXXX is the thing you want to know about (statement, procedure, error text, whatever). Works fine for me any time.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 13:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424898#M104620</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-04T13:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424917#M104628</link>
      <description>no, they are two different variables. sesso is the sex (0=f,1=male) I have to create a new RCB variable with the values I have stratified by sex.&lt;BR /&gt;wbc for women (sex = 0) its range is from 370 to 500 the values out of the range become 0 inside equal to 1, for males (sex = 1) their range goes from 410 to 540 values out of the range become o and inside 1.&lt;BR /&gt;should the output be 0 and 1 in a single variable?</description>
      <pubDate>Thu, 04 Jan 2018 14:06:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424917#M104628</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T14:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424919#M104630</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184864"&gt;@michshoot&lt;/a&gt; wrote:&lt;BR /&gt;no, they are two different variables. sesso is the sex (0=f,1=male) I have to create a new RCB variable with the values I have stratified by sex.&lt;BR /&gt;wbc for women (sex = 0) its range is from 370 to 500 the values out of the range become 0 inside equal to 1, for males (sex = 1) their range goes from 410 to 540 values out of the range become o and inside 1.&lt;BR /&gt;should the output be 0 and 1 in a single variable?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So you will need to declare an array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array rbc_sex {2} rbc_f rbc_m; /* or whatever your rbc for female/male are called */
if rbc_sex{sesso+1} &amp;lt;= 2600 or rbc_sex{sesso+1} &amp;gt;= 7800
then rbc = 0;
else rbc = 1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is that what you intend to do?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424919#M104630</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-04T14:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424923#M104633</link>
      <description>data dsd;&lt;BR /&gt;set datasetdummy ;&lt;BR /&gt;if RBC=Sesso=0&amp;lt;=370 then RBC=0; else if RBC=Sesso=0&amp;gt;=500 ;else RBC=Sesso=0=1;&lt;BR /&gt;if RBC=Sesso=1&amp;lt;=410 then RBC=0; else if RBC=Sesso=1&amp;gt;=540 ;else RBC=Sesso=1=1;&lt;BR /&gt;run;&lt;BR /&gt;I was wrong to post it, I can say how to implement it I have 2 range permaschio and female, thanks ..</description>
      <pubDate>Thu, 04 Jan 2018 14:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424923#M104633</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424927#M104636</link>
      <description>&lt;P&gt;Could you give an example for datasetdummy, so we can see the real names of your variables?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 14:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424927#M104636</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-04T14:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424929#M104638</link>
      <description />
      <pubDate>Thu, 04 Jan 2018 14:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424929#M104638</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T14:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424936#M104645</link>
      <description>&lt;P&gt;There's only one RBC and one WBC variable, nothing that is sex-specific. I still have no clue what you try to do with the syntax&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if RBC=Sesso=0&amp;lt;=370&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as that condition would only be true if RBC and Sesso were both 0. And the last part of the condition doesn't make any sense at all, as zero is always smaller than 370.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 15:09:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424936#M104645</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-04T15:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424940#M104646</link>
      <description>&lt;BR /&gt;by sesso = 0 is the woman by sesso= 1 is the man&lt;BR /&gt;&lt;BR /&gt;they have different ranges</description>
      <pubDate>Thu, 04 Jan 2018 15:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424940#M104646</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T15:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424954#M104652</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184864"&gt;@michshoot&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello to all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how do I do if I have a sex-dependent variable?&lt;BR /&gt;wbc for women (sex = 0) its range is from 370 to 500 the values out of the range become 0 inside equal to 1, for males (sex = 1) their range goes from 410 to 540 values out of the range become o and inside 1.&lt;BR /&gt;&lt;BR /&gt;should the output be 0 and 1 in a single variable?&lt;/P&gt;
&lt;P&gt;I tried in the second part of the eg.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1. When recoding I generally place the values into a new variable so that errors of coding are easy to debug.&lt;/P&gt;
&lt;P&gt;2. Often with ranges such as this I create custom formats as then I do not need to modify the data at all and most analysis procedures will use the formatted values as categories UNLESS I have an instance such as you have where the ranges differ by another characteristic such as gender or age.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use logic results to assign 0, 1 such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;   if sex=0 then do;
      wbc = (370 le wbc le 500);
   end;
   else do;
      wbc = (410 le wbc le 540);
   end;
&lt;/PRE&gt;
&lt;P&gt;SAS will assign a value of 1 to "true"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 16:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424954#M104652</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-04T16:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424965#M104656</link>
      <description>thank's</description>
      <pubDate>Thu, 04 Jan 2018 16:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424965#M104656</guid>
      <dc:creator>michshoot</dc:creator>
      <dc:date>2018-01-04T16:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424979#M104661</link>
      <description>&lt;P&gt;You can have two conditions in your IF statements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if sex=0 and wbc &amp;gt;= 370 and wbc &amp;lt;= 500 then wbc_category=0; &lt;BR /&gt;    else wbc_category=1;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I've formatted your code in your original question. In the future please take the time to do so yourself, and it helps if you only include code relevant to the problem at hand. If you're using SAS EG, highlight your code and press CTRL+I to have it formatted. In SAS studio, use the second from last icon in the ribbon. Formatting your code for legibility makes it easier to find errors and to debug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, please note that everyone on here is a volunteer and respectful and polite responses are appreciated. Statements like the one below are not helpful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;you did not answer my question?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;how to implement eg 2 !!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RBC?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that however is sas fault there are few online guides !!&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a ton of SAS 'online guides' out there if you search.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For starters, the first programming course (online version) is free and&amp;nbsp;would cover the topic in your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additionally, here are some other resources you can use in the future to help you learn.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/edu/schedules.html?ctry=us&amp;amp;crs=PROG1" target="_blank"&gt;https://support.sas.com/edu/schedules.html?ctry=us&amp;amp;crs=PROG1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://video.sas.com/#category/videos/how-to-tutorials" target="_blank"&gt;http://video.sas.com/#category/videos/how-to-tutorials&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Lexjansen.com -&amp;gt; use this if you have a specific topic you'd like help with. This are user written papers so the quality can vary.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/modules/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first Statistics e-course is also free.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 16:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-Help/m-p/424979#M104661</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-04T16:44:01Z</dc:date>
    </item>
  </channel>
</rss>

