<?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 program ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560306#M156645</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122002"&gt;@VDD&lt;/a&gt;&amp;nbsp; We've all been there!&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2019 22:38:12 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-05-20T22:38:12Z</dc:date>
    <item>
      <title>How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560148#M156548</link>
      <description>&lt;P&gt;Hello I built a program that perform two nested loop in a pretty large table; the program takes a lot of time to be run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At some point SAS EG alerted me that the log was to big, and that the log will not be printed. After the message appeared the program started to run faster.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can I speed up my program by not printing the log ? If yes was is the option to do that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other way to speed up a program?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 14:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560148#M156548</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560151#M156551</link>
      <description>&lt;P&gt;You can use PROC PRINTTO to send the log to a file. Here is an example of doing this if you are using Windows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto log = "c:\data\users\pmiller\temp.log" new; run;
/* Your SAS code goes here */
proc printto; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't know if this will speed things up enough for you, but you won't get the message that the log window is full.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other reasons why your code might take a long time, and the two nested loops may or may not be part of the problem. If you can replace the loops with BY statements, that would speed things up a lot. (But sometimes that is not possible)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In addition, you should examine the log to determine which steps are taking up the most time, and see if there are ways to speed up that particular step.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 14:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560151#M156551</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-05-20T14:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560154#M156553</link>
      <description>&lt;P&gt;this code helps me a lot with logging.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html close; 
DM log "OUT;CLEAR;LOG;CLEAR;" log continue ;
DM log 'next results; clear; cancel;' whostedit continue ;
ods html newfile=none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 14:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560154#M156553</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-20T14:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560160#M156557</link>
      <description>Hello&lt;BR /&gt;Can you explain what it does ?&lt;BR /&gt;Thank you</description>
      <pubDate>Mon, 20 May 2019 14:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560160#M156557</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T14:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560161#M156558</link>
      <description>&lt;P&gt;Another thing that can speed up a program (not all programs, but many)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This assumes that you don't need ODS GRAPHICS in your program.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 14:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560161#M156558</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-05-20T14:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560172#M156565</link>
      <description>&lt;P&gt;There could be techniques to speed up your program, but without seeing the code, it is difficult to suggest something useful.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 15:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560172#M156565</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-05-20T15:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560173#M156566</link>
      <description>&lt;P&gt;1) are you using a lot of put statements ? (i generally comment most of them out when promoting)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) is your Large table a SAS Table OR residing on some database server like oracle. if you do a federated join your performance will be bad.&lt;BR /&gt;&lt;BR /&gt;3) if your dataset is on SAS and program is calculation intensive, then you must check out Proc DS2 for multi-thread processing.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 15:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560173#M156566</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-05-20T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560202#M156584</link>
      <description>&lt;P&gt;Here is a simplified version of what I do :&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;%MACRO MacroProgram;&lt;BR /&gt;&lt;BR /&gt;%let i=1;&lt;BR /&gt;&lt;BR /&gt;data TableWant;&lt;BR /&gt;Lenght Variable1 $200;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%DO %WHILE (&amp;amp;i&amp;lt;150);

data _null_;
set TableA;
if _N_=&amp;amp;i then&amp;nbsp;
call symput('MacroVariable',SomeVariableFromTableA)
run;

data TEMP;
VariableTableTemp=&amp;amp;Macrovariable;
run;

Proc Append base=TableWant data=TEMP;&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;%let i=%eval(&amp;amp;i+1);&lt;BR /&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;%mend;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a 45000+ notes in the log saying:&lt;/P&gt;&lt;P&gt;-that some variables are uninitialized;&lt;/P&gt;&lt;P&gt;-some numeric values have been converted ro characters values;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe this is the reason why it takes time.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 15:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560202#M156584</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T15:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560209#M156588</link>
      <description>&lt;P&gt;Are you checking if the variable exists on your source dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the uninitialized is because the variable does not exist.&lt;/P&gt;&lt;P&gt;and the numeric to char warning is because &amp;nbsp;Symput is converting it to char.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is your TableA that is pretty large ? &amp;nbsp;( i feel using IF is inefficient there thus asking)&lt;/P&gt;&lt;P&gt;Looking at you code are you trying to fetch the first value of some column for the first 150 rows ? (OR a range of rows ?)&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 16:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560209#M156588</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-05-20T16:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560211#M156590</link>
      <description>&lt;P&gt;What can I change in this code to avoid unitialized variables :&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TEMP;
LENGTH VARIABLE1-VARIABLE10 $200;
OUTPUT;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;By doing this i want to "initialize" the TEMP TABLE &amp;nbsp;before adding values later in the macro program, but I feel that it's wrong.&lt;/P&gt;&lt;P&gt;What do you think ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 16:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560211#M156590</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T16:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560222#M156596</link>
      <description>&lt;P&gt;I am assuming you need a table without any rows for initialization&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;DATA TEMP;
LENGTH VARIABLE1-VARIABLE10 $200;

call missing(of VARIABLE1-VARIABLE10);

STOP;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still feel the log isnt reason for your performance. but give it a shot.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 16:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560222#M156596</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-05-20T16:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560223#M156597</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO MYPROGRAM;

%LET I=1;

%DO %WHILE (&amp;amp;i&amp;lt;200)

DATA _NULL_;
SET TABLEA;
IF _N_=&amp;amp;i THEN CALL SYMPUT('MACROVARIABLE',VarThatINeed);
RUN;

DATA TEMP;
SET TEMP;
VARIABLE=SYMGET('MACROVARIABLE');
RUN;

PROC APPEND BASE=TABLEWANT DATA=TEMP;

%LET &amp;amp;I=%EVAL(&amp;amp;i+1)
%MEND;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am pretty sure the IF in the data step is not efficient, is there a way to point directly to i th observation without using " if _n_=&amp;amp;i " ?&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 16:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560223#M156597</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T16:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560228#M156601</link>
      <description>&lt;P&gt;pointing to Nth observation - you can use POINTOBS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But going back to my earlier question - are you just trying to fetch the values of certain columns for first 150 or 200 rows&amp;nbsp;&lt;BR /&gt;(or a range like between row# 100 and 200 )&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 17:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560228#M156601</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-05-20T17:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560231#M156604</link>
      <description>&lt;P&gt;All rows, but one row at a time, one single row at each stage of the loop and using 5 columns/variables for every row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS EG GRID running on server, can it be a reason for slowness ?&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 17:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560231#M156604</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T17:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560234#M156607</link>
      <description>&lt;P&gt;The values of those 5 columns/variables are stored in macro variables, and used in the TEMP TABLE and append step.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 17:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560234#M156607</guid>
      <dc:creator>Hugo_B</dc:creator>
      <dc:date>2019-05-20T17:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560235#M156608</link>
      <description>&lt;P&gt;I dont think SAS EG is the reason. I use SAS EG on Grid and it works fine for me ..&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am curious as to why you are processing &amp;nbsp;1 Row at a time and how many Rows do you have in the table ...&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Depending on your answer i cud tell if it could be written better way.&lt;/P&gt;&lt;P&gt;i do similar macro based fetch when i have to fetch from Oracle, But i always do it in sets of 1000 at a &amp;nbsp;time&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 17:38:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560235#M156608</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-05-20T17:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560282#M156637</link>
      <description>&lt;P&gt;It's curious that you are using 600 steps instead of 2 steps, and then wondering about why the program takes so long.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You only posted the idea of what the program should do, so here's the idea of how to fix it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data subset_a;
   set tablea (obs=200 keep=VarThatINeed);&lt;BR /&gt;   ordervar = _n_;
run;

proc sql;
   create table want as select a.*, b.* from subset_a a, temp b
   order by ordervar;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2019 20:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560282#M156637</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-20T20:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560301#M156642</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;DATA&lt;/SPAN&gt; TEMP&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;LENGTH&lt;/SPAN&gt; VARIABLE1&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;VARIABLE10 &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;200&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
OUTPUT&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;RUN&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is normally better coded as&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;data TEMP&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  if 0 then set SOURCETAB (keep=VARIABLE1&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;VARIABLE10)&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as this copies the original structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, $200 variables create long records, and SAS is not efficient dealing with these. Shorten the variables if you can. And compress the tables.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 22:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560301#M156642</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-05-20T22:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560303#M156643</link>
      <description>&lt;P&gt;This whole macro&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;&lt;SPAN class="token macrobound"&gt;%MACRO&lt;/SPAN&gt; MacroProgram&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; i&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; TableWant&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;Lenght Variable1 &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;200&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%DO&lt;/SPAN&gt; &lt;SPAN class="token macrostatement"&gt;%WHILE&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;i&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;150&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; _null_&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;set&lt;/SPAN&gt; TableA&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; _N_&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;i &lt;SPAN class="token keyword"&gt;then&lt;/SPAN&gt; 
call &lt;SPAN class="token function"&gt;symput&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'MacroVariable'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;SomeVariableFromTableA&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; TEMP&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
VariableTableTemp&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;Macrovariable&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;Proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;Append&lt;/SPAN&gt; base&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;TableWant &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;TEMP&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is identical to this step&lt;/P&gt;
&lt;PRE&gt;data TableWant ; 
  set TableA (obs=150 keep=SomeVariableFromTableA);
  VariableTableTemp=SomeVariableFromTableA;
run;
&lt;/PRE&gt;
&lt;P&gt;This does not represent your processing I suppose, but do reduce the number of steps to speed up the process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 22:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560303#M156643</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-05-20T22:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to speed up a program ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560305#M156644</link>
      <description>&lt;P&gt;new user don't really understand KISS.&amp;nbsp; Keep It Simple Stupid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 22:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-speed-up-a-program/m-p/560305#M156644</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2019-05-20T22:30:23Z</dc:date>
    </item>
  </channel>
</rss>

