<?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: data steps versus proc sql in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135025#M36551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I often see this question raised on games programming forums, what technology is best from x or y.&amp;nbsp; The answer is inevitably based on what can "you" do with the technology, and what the goal is.&amp;nbsp; If your happy merging datasets and find joins and such like difficult then keep using datasteps.&amp;nbsp; There are of course some considerations, such as speed of execution and memory/hdd space, however unless you are dealing with large datasets (i.e. in the millions of records) it shouldn't matter too much to you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 14:33:08 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2014-10-21T14:33:08Z</dc:date>
    <item>
      <title>data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135021#M36547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I am starting to be a little familiar with sas, and I realize that a lot of operations that I learned to do with data sets can also be done using proc sql statements, including merging, creating variables, subsetting and many others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is therefore&amp;nbsp; : "When is it best to do what ?", is proc sql better ? always ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 13:43:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135021#M36547</guid>
      <dc:creator>Aboiron</dc:creator>
      <dc:date>2014-10-21T13:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135022#M36548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is very often asked question search for it, also check the communities for similar question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may check:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://blogs.sas.com/content/sastraining/2010/12/17/five-reasons-to-use-the-sas-data-step-or-proc-sql/"&gt;Five reasons to use the SAS DATA Step or PROC SQL&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135022#M36548</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2014-10-21T14:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135023#M36549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No. Each has its advantage and disadvantage .Sometime Data Step is better than SQL, Sometime vice verse .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:21:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135023#M36549</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-10-21T14:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135024#M36550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it is mostly determined by your background.&amp;nbsp; If you grew up as a sql coder, you would probably prefer sql...but as other's have mentioned, there are some things that are better done in data steps..some things are better in sql.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135024#M36550</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2014-10-21T14:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135025#M36551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I often see this question raised on games programming forums, what technology is best from x or y.&amp;nbsp; The answer is inevitably based on what can "you" do with the technology, and what the goal is.&amp;nbsp; If your happy merging datasets and find joins and such like difficult then keep using datasteps.&amp;nbsp; There are of course some considerations, such as speed of execution and memory/hdd space, however unless you are dealing with large datasets (i.e. in the millions of records) it shouldn't matter too much to you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135025#M36551</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-10-21T14:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135026#M36552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends.&amp;nbsp; Just like a carpenter may use different tools for different tasks, a SAS programmer will either use the DATA step or PROC SQL step depending on the circumstances.&amp;nbsp; The DATA step is very useful when you need to implement business logic or do heavy manipulations on your data.&amp;nbsp; Meanwhile, PROC SQL is useful for mining from a variety of datasouces.&amp;nbsp; Once you become familar and comfortable with both steps, you'll develop a propensity to use the most applicable step depending on the situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a nutshell, DATA step is great for business logic and heavy data manipulations.&amp;nbsp; PROC SQL is great and intuitive for mining and combing many data sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd check out this paper for an introduction to the differences between the DATA step and PROC SQL: &lt;A href="http://www2.sas.com/proceedings/sugi29/269-29.pdf"&gt;http://www2.sas.com/proceedings/sugi29/269-29.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy Programming! :smileysilly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135026#M36552</guid>
      <dc:creator>SASMike</dc:creator>
      <dc:date>2014-10-21T14:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135027#M36553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So a answer with "it depends" does not help at all. If you do so, please at least tell on what id does depend.&lt;/P&gt;&lt;P&gt;Then, it sometimes happens that something is better, that is why there is research in algorithms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I rephrase my question : which one is the fastest, which one is the less memory consuming, in which cases. &lt;/P&gt;&lt;P&gt;And it happens that I have data with several millions observations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 14:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135027#M36553</guid>
      <dc:creator>Aboiron</dc:creator>
      <dc:date>2014-10-21T14:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: data steps versus proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135028#M36554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aboiron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can you do with the datastep.&lt;/P&gt;&lt;P&gt;- process all kind of external input data (Sftp url flat files)&lt;/P&gt;&lt;P&gt;- combining a lot of datasources at the same time&amp;nbsp; (set merge point) Hash object&amp;nbsp; external fcuntions like Perl (regular strings).&lt;/P&gt;&lt;P&gt;- creating a lot of dataset as SAS datasets or as tables, all in one pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can you do with SQL.&lt;/P&gt;&lt;P&gt;- Accessing external DBMS systems in their advanced native mode.&lt;/P&gt;&lt;P&gt;- working with sas-datasets in the same way as on a external dbms and combine those&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When there is a different functionality choose the best tool for that fcuntionality.&lt;/P&gt;&lt;P&gt;A hammer and screw is a bad combination. This implies you have to learn to use/understand those different tools.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What to choose when there is a good overlap, is that your question?.&lt;/P&gt;&lt;P&gt;The datastep is fast when the sequential approach is good and the limitation is IO speed.&lt;/P&gt;&lt;P&gt;Proc SQL by nature is better when you can use the multithreading features. That is processing al lot in parallel.&lt;/P&gt;&lt;P&gt;When that processing in parallel is alo IO bound and that is sequential (SAN or that spinning thing dasd) when hitting above about 20% of the data (rule of thumb) it will lose in turn around time of sequential processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All other factors when speed does not matter but the ease of coding is the most major issue.&lt;/P&gt;&lt;P&gt;Make it as readable and comfortable as you like (personal favors). With most small datasets executing time is not the problem but coding time.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 15:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/data-steps-versus-proc-sql/m-p/135028#M36554</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-10-21T15:52:00Z</dc:date>
    </item>
  </channel>
</rss>

