<?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: Long processing time with birth dataset in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547633#M7320</link>
    <description>&lt;P&gt;If you want to apply multiple restrictions use AND between the different qualifiers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA G7Data.Restricted;
	SET RMG7.CO_BIRTH_FALL2018_PRMD6626 (KEEP = ID MatTrans Income MEduc BWGr Apgar5 Apgar10
						Plurality FacilityTpye AttendantType Gindex BirthState
					        EstGest EstGestOb EstGestClin);
   where Plurality = "1" 
	 and  AttendantType in( "1" "2""3"  "4") 
    and  FacilityType = "1" 
	 and BirthState = "99999000006" 
	 and 18 le M_Age LE 35 
  ;
RUN;&lt;/PRE&gt;
&lt;P&gt;The IN operator is basically a shorthand for Variable = "value" or variable = "other value" or variable= "yet another value"&lt;/P&gt;
&lt;P&gt;with some added advantages for ranges of integer values.&lt;/P&gt;
&lt;P&gt;SAS supports&amp;nbsp;&amp;nbsp; a &amp;lt; b &amp;lt; c type comparisons so you can more easily see things than having to use an AND with two comparisons.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 15:25:29 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-04-01T15:25:29Z</dc:date>
    <item>
      <title>Long processing time with birth dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547510#M7314</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to restrict a birth dataset for a class (see below). I'm new to coding so I'm sure my code isn't the most eloquent, however, regardless of what code I try to run SAS Studio is taking a long time to process. Any suggestions? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA G7Data.Restricted;&lt;BR /&gt;	SET RMG7.CO_BIRTH_FALL2018_PRMD6626 (KEEP = ID MatTrans Income MEduc BWGr Apgar5 Apgar10&lt;BR /&gt;						Plurality FacilityTpye AttendantType Gindex BirthState&lt;BR /&gt;					        EstGest EstGestOb EstGestClin);&lt;BR /&gt;	IF Plurality = "1" THEN OUTPUT G7Data.Restricted;&lt;BR /&gt;	IF AttendantType = "1" OR&lt;BR /&gt;	   AttendantType = "2" OR&lt;BR /&gt;	   AttendantType = "3" OR&lt;BR /&gt;	   AttendantType = "4" THEN OUTPUT G7Data.Restricted;&lt;BR /&gt;	IF FacilityType = "1" THEN OUTPUT G7Data.Restricted;&lt;BR /&gt;	IF BirthState = "99999000006" THEN OUTPUT G7Data.Restricted;&lt;BR /&gt;	IF M_Age GE 18 AND LE 35 THEN OUTPUT G7Data.Restricted;&lt;BR /&gt;RUN;&lt;/PRE&gt;</description>
      <pubDate>Sun, 31 Mar 2019 19:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547510#M7314</guid>
      <dc:creator>m_sd</dc:creator>
      <dc:date>2019-03-31T19:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Long processing time with birth dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547512#M7315</link>
      <description>&lt;P&gt;If there is more then one true condition shall the code output be &lt;STRONG&gt;duplicated&lt;/STRONG&gt; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the answer is negative change the inner step code to:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;IF Plurality = "1"                OR
   ("1" le AttendantType le "4")  OR
    FacilityType = "1"            OR
    BirthState = "99999000006"    OR
   (M_Age GE 18 AND M_Age LE 35)
    THEN OUTPUT G7Data.Restricted;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I see no reason that code will run for long time unless the dataset is very big.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 19:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547512#M7315</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-03-31T19:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Long processing time with birth dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547513#M7316</link>
      <description>&lt;P&gt;I had to restart SAS Studio for the code to work, but I realized the code I wrote was duplicating. Thank you for that suggestion, I'm going to try it out!&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 19:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547513#M7316</guid>
      <dc:creator>m_sd</dc:creator>
      <dc:date>2019-03-31T19:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Long processing time with birth dataset</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547633#M7320</link>
      <description>&lt;P&gt;If you want to apply multiple restrictions use AND between the different qualifiers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DATA G7Data.Restricted;
	SET RMG7.CO_BIRTH_FALL2018_PRMD6626 (KEEP = ID MatTrans Income MEduc BWGr Apgar5 Apgar10
						Plurality FacilityTpye AttendantType Gindex BirthState
					        EstGest EstGestOb EstGestClin);
   where Plurality = "1" 
	 and  AttendantType in( "1" "2""3"  "4") 
    and  FacilityType = "1" 
	 and BirthState = "99999000006" 
	 and 18 le M_Age LE 35 
  ;
RUN;&lt;/PRE&gt;
&lt;P&gt;The IN operator is basically a shorthand for Variable = "value" or variable = "other value" or variable= "yet another value"&lt;/P&gt;
&lt;P&gt;with some added advantages for ranges of integer values.&lt;/P&gt;
&lt;P&gt;SAS supports&amp;nbsp;&amp;nbsp; a &amp;lt; b &amp;lt; c type comparisons so you can more easily see things than having to use an AND with two comparisons.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 15:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Long-processing-time-with-birth-dataset/m-p/547633#M7320</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-01T15:25:29Z</dc:date>
    </item>
  </channel>
</rss>

