<?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: How to speed up a datastep procedure? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603887#M174998</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You will need to tell ORACLE what columns you want to read it with the KEEP= dataset option.&amp;nbsp; You might still need a KEEP, or more likely a DROP statement, to tell SAS what variables from the data step to write out.&amp;nbsp; Some people code a KEEP= dataset option on the output dataset name, but I always find that as a confusing way to code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also perhaps increase the speed a lot by doing the processing in Oracle. Especially if you want to eliminate observations based on some of your calculated variables.&amp;nbsp; Or even more so if you want to just summarize the data instead of getting all of the detail lines.&amp;nbsp; But then you need to know how to code in Oracle's flavor of SQL.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try the "KEEP=" options in the input dataset. By the mean time, I tried to re-run this code with those options :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options threads cpucount=actual;
options msglevel=i fullstimer;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And here's the ouput in the log. Is there something you see that could be a hint of improvement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: DATA statement used (Total process time):

real time 17:02.43
user cpu time 2:16.40
system cpu time 19.93 seconds
memory 1200.62k
OS Memory 23976.00k
Timestamp 2019-11-13 10:21:20 AM
Step count 36  swtich count 132
Page faults 3
Page Reclaims 7380
Page Swaps 0
Voluntary Context Switches 2226057
Involuntary  Context Switches 2113
Block Input Operations 15944
Block Output Operations 263968&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Nov 2019 15:25:45 GMT</pubDate>
    <dc:creator>jpprovost</dc:creator>
    <dc:date>2019-11-13T15:25:45Z</dc:date>
    <item>
      <title>How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603878#M174992</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a database which is assigned by a libname and I want to grab data from this dataset which contains 10,664,192 observations.&lt;/P&gt;
&lt;P&gt;The following code is used to extract a subset of this dataset and the subset itself contains about 1,531,165 observations.&lt;/P&gt;
&lt;P&gt;The time (real time) for the code to run is 17 min 37 sec, which I find a bit long. Is there a way to improve the code for it to be faster a little bit or there's no improvement possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let MY = 201910;

data subset;
set myset(where=(source="XYZ"));
if put(effective_date, yymmn.) &amp;lt;= &amp;amp;MY. and put(expired_date,yymmn.) &amp;gt;= &amp;amp;MY.;

keep field1 field2 field3 field4 field5 field6 ... field14;
if state in ("BC") then tx = 0.02;
else if state in ("NT") then tx = 0.03;
else if state in ("YK") then tx = 0.02;
.... (there's 10 more else if statements)
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am pretty sure there's something I could do tu make this code faster. I tried with options threads cpucount=actual but I think this is not working with datastep procedure. I am using SAS EG on a Grid environment (Unix).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any help. This is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603878#M174992</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T15:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603880#M174994</link>
      <description>&lt;P&gt;Depends a lot one your computing environment.&amp;nbsp; Where is the source dataset being read from? Where are you writing the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the source is some external database it might help a lot to change the KEEP statement into a KEEP= dataset option on the input dataset as that will limit the amount of data that needs to move from the external database into SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603880#M174994</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T15:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603881#M174995</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Depends a lot one your computing environment.&amp;nbsp; Where is the source dataset being read from? Where are you writing the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the source is some external database it might help a lot to change the KEEP statement into a KEEP= dataset option on the input dataset as that will limit the amount of data that needs to move from the external database into SAS.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The source is read from an Oracle database (on the network) and I am writing the result in the SAS WORK library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the keep options, since those else/if statements create 3 new fields, should I write the keep options in the input dataset with those fields or this is not necessary?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603881#M174995</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T15:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603883#M174996</link>
      <description>&lt;P&gt;You will need to tell ORACLE what columns you want to read it with the KEEP= dataset option.&amp;nbsp; You might still need a KEEP, or more likely a DROP statement, to tell SAS what variables from the data step to write out.&amp;nbsp; Some people code a KEEP= dataset option on the output dataset name, but I always find that as a confusing way to code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also perhaps increase the speed a lot by doing the processing in Oracle. Especially if you want to eliminate observations based on some of your calculated variables.&amp;nbsp; Or even more so if you want to just summarize the data instead of getting all of the detail lines.&amp;nbsp; But then you need to know how to code in Oracle's flavor of SQL.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603883#M174996</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T15:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603885#M174997</link>
      <description>&lt;P&gt;One place:&lt;/P&gt;
&lt;PRE&gt;if put(effective_date, yymmn.) &amp;lt;= &amp;amp;MY. and put(expired_date,yymmn.) &amp;gt;= &amp;amp;MY.;
&lt;/PRE&gt;
&lt;P&gt;Instead of doing 2 numeric to text and then comparing, and possibly I would even guess a further text to numeric conversion create an actual date value for &amp;amp;MY and you could add to the where clause&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;and( effective_date le &amp;amp;my. and expired_date ge &amp;amp;my.)&lt;/PRE&gt;
&lt;P&gt;If you see a NOTE about character to numeric conversions then you are wasting cycles with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another though very minor is this set of If/then/else statements.&lt;/P&gt;
&lt;PRE&gt;if state in ("BC") then tx = 0.02;
else if state in ("NT") then tx = 0.03;
else if state in ("YK") then tx = 0.02;
&lt;/PRE&gt;
&lt;P&gt;An INFORMAT when you are assigning values based on a single input variable, especially if it does not change often can execute much quicker:&lt;/P&gt;
&lt;PRE&gt;Proc format library=work;
invalue sttx
'BC' = 0.02
'NT' = 0.03
'YK' = 0.02
other=_error_
;
run;

data example;
   input st $;
   tx = input(st,sttx.);
datalines;
BC
NT
YK
QQ
;
&lt;/PRE&gt;
&lt;P&gt;The option on the invalue of other=_error_ treats any unexpected value as an error, which your If/Then/Else approach may not catch (since you didn't show the entire block);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603885#M174997</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-13T15:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603887#M174998</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;You will need to tell ORACLE what columns you want to read it with the KEEP= dataset option.&amp;nbsp; You might still need a KEEP, or more likely a DROP statement, to tell SAS what variables from the data step to write out.&amp;nbsp; Some people code a KEEP= dataset option on the output dataset name, but I always find that as a confusing way to code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also perhaps increase the speed a lot by doing the processing in Oracle. Especially if you want to eliminate observations based on some of your calculated variables.&amp;nbsp; Or even more so if you want to just summarize the data instead of getting all of the detail lines.&amp;nbsp; But then you need to know how to code in Oracle's flavor of SQL.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will try the "KEEP=" options in the input dataset. By the mean time, I tried to re-run this code with those options :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options threads cpucount=actual;
options msglevel=i fullstimer;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And here's the ouput in the log. Is there something you see that could be a hint of improvement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: DATA statement used (Total process time):

real time 17:02.43
user cpu time 2:16.40
system cpu time 19.93 seconds
memory 1200.62k
OS Memory 23976.00k
Timestamp 2019-11-13 10:21:20 AM
Step count 36  swtich count 132
Page faults 3
Page Reclaims 7380
Page Swaps 0
Voluntary Context Switches 2226057
Involuntary  Context Switches 2113
Block Input Operations 15944
Block Output Operations 263968&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603887#M174998</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603888#M174999</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285961"&gt;@jpprovost&lt;/a&gt; maybe try doing the processing into more than one datastep.&amp;nbsp; Fetch data =&amp;gt; work data =&amp;gt; put results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;combined those states where the tax is the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use Proc SQL with case conditions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603888#M174999</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-11-13T15:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603889#M175000</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;One place:&lt;/P&gt;
&lt;PRE&gt;if put(effective_date, yymmn.) &amp;lt;= &amp;amp;MY. and put(expired_date,yymmn.) &amp;gt;= &amp;amp;MY.;
&lt;/PRE&gt;
&lt;P&gt;Instead of doing 2 numeric to text and then comparing, and possibly I would even guess a further text to numeric conversion create an actual date value for &amp;amp;MY and you could add to the where clause&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;and( effective_date le &amp;amp;my. and expired_date ge &amp;amp;my.)&lt;/PRE&gt;
&lt;P&gt;If you see a NOTE about character to numeric conversions then you are wasting cycles with this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another though very minor is this set of If/then/else statements.&lt;/P&gt;
&lt;PRE&gt;if state in ("BC") then tx = 0.02;
else if state in ("NT") then tx = 0.03;
else if state in ("YK") then tx = 0.02;
&lt;/PRE&gt;
&lt;P&gt;An INFORMAT when you are assigning values based on a single input variable, especially if it does not change often can execute much quicker:&lt;/P&gt;
&lt;PRE&gt;Proc format library=work;
invalue sttx
'BC' = 0.02
'NT' = 0.03
'YK' = 0.02
other=_error_
;
run;

data example;
   input st $;
   tx = input(st,sttx.);
datalines;
BC
NT
YK
QQ
;
&lt;/PRE&gt;
&lt;P&gt;The option on the invalue of other=_error_ treats any unexpected value as an error, which your If/Then/Else approach may not catch (since you didn't show the entire block);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw a note about conversion, you are right. Will try to use your advice. However, I would like to passe the condition on thoses dates (expired and effective) into the WHERE in the input dataset line. How could I do that if I already have one condition (which is the SOURCE =...)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:33:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603889#M175000</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603895#M175001</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285961"&gt;@jpprovost&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw a note about conversion, you are right. Will try to use your advice. However, I would like to passe the condition on thoses dates (expired and effective) into the WHERE in the input dataset line. How could I do that if I already have one condition (which is the SOURCE =...)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;WHERE will allow many conditions just like any IF.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;set somedataset (where = (&amp;nbsp; ( thisvar = 57 and thatvar in ( 2 3 4 )&amp;nbsp; ) or Name='Jake' ) );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 15:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603895#M175001</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-13T15:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603900#M175003</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122002"&gt;@VDD&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/285961"&gt;@jpprovost&lt;/a&gt; maybe try doing the processing into more than one datastep.&amp;nbsp; Fetch data =&amp;gt; work data =&amp;gt; put results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;combined those states where the tax is the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use Proc SQL with case conditions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122002"&gt;@VDD&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried with a PROC SQL and the CASE conditions. Wow, really fast (2 min vs 17 min). Really good improvement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to combine my WHERE and my KEEP into one line and it says that one of my variable (SOURCE) is not on file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the line :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set myset(keep =  field1 field2 field3 field4 field5 field6 ... field14 where=(source="XYZ" and effective_date &amp;lt;= &amp;amp;MY. and expired_date &amp;gt;= &amp;amp;MY.));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I got the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Variable SOURCE is not on file myset.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603900#M175003</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T16:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603904#M175005</link>
      <description>You told Oracle you didn't want SOURCE, so you cannot use it in the WHERE clause.&lt;BR /&gt;Hint: SAS will process the dataset options in alphabetical order, WHERE is the last one.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603904#M175005</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-13T16:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603905#M175006</link>
      <description>&lt;P&gt;If you are extracting only small &lt;STRONG&gt;part of possible states&lt;/STRONG&gt; and the state is a key in the database (&lt;STRONG&gt;indexed&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;then use :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   set myset(where = (state in('BC', 'NT' ....) and source = 'XYZ'));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;that will eliminate data transfer from oracle to sas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603905#M175006</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-11-13T16:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a datastep procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603933#M175014</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;You told Oracle you didn't want SOURCE, so you cannot use it in the WHERE clause.&lt;BR /&gt;Hint: SAS will process the dataset options in alphabetical order, WHERE is the last one.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It works, my bad.&lt;/P&gt;
&lt;P&gt;Thanks to all. Very useful as always.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 18:52:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-datastep-procedure/m-p/603933#M175014</guid>
      <dc:creator>jpprovost</dc:creator>
      <dc:date>2019-11-13T18:52:51Z</dc:date>
    </item>
  </channel>
</rss>

