<?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: Date Step and Proc Step in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544909#M7959</link>
    <description>&lt;P&gt;Agreed, with a little detail to add.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Global statements include non-macro statements such as TITLE and OPTION statements.&amp;nbsp; Technically those are not part of a DATA or PROC step.&amp;nbsp; However, they are not considered a "step", merely a "statement" that remains in effect until changed later.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2019 15:47:25 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2019-03-21T15:47:25Z</dc:date>
    <item>
      <title>Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544892#M7956</link>
      <description>&lt;P&gt;Hi, I have some questions about these two steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Is there any other&amp;nbsp;steps in SAS other than Date Step and Proc Step?&lt;/P&gt;&lt;P&gt;2. If the step begins with Data&amp;nbsp; then it's a Data step and if it begins with PROC then it is a PROC step?&lt;/P&gt;&lt;P&gt;3. Is PROC SQL considered as&amp;nbsp;a PROC step?&lt;/P&gt;&lt;P&gt;4. PDV and the two automatic variables _N_ and _ERROR_, are only available in Date steps or in any SAS program or steps?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 15:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544892#M7956</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2019-03-21T15:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544899#M7957</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/253026"&gt;@cosmid&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;Hi, I have some questions about these two steps.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here are some of &lt;STRONG&gt;&lt;U&gt;my opinions&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&amp;nbsp;Is there any other&amp;nbsp;steps in SAS other than Data Step and Proc Step?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I don't think so. Unless you may want to define any open code/global statements that is processed by the macro processor and compiler respectively as an exclusive step of its own making it the third one.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2. If the step begins with Data&amp;nbsp; then it's a Data step and if it begins with PROC then it is a PROC step?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I think that's correct at least that's how it is portrayed in docs&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. Is PROC SQL considered as&amp;nbsp;a PROC step?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I suppose PROC is a keyword that stands for procedure. So, yes a procedure that invokes sql should indeed be considered PROC step until you &lt;STRONG&gt;"quit;"&lt;/STRONG&gt; the procedure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. PDV and the two automatic variables _N_ and _ERROR_, are only available in Date steps or in any SAS program or steps?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes for the reason _N_ is an automatic variable that takes the values soon as datastep execution loops past the data statement and I don't think this facility is available in a proc. Both these are created in the PDV at compile time&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 15:25:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544899#M7957</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-03-21T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544909#M7959</link>
      <description>&lt;P&gt;Agreed, with a little detail to add.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Global statements include non-macro statements such as TITLE and OPTION statements.&amp;nbsp; Technically those are not part of a DATA or PROC step.&amp;nbsp; However, they are not considered a "step", merely a "statement" that remains in effect until changed later.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 15:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544909#M7959</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-03-21T15:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544910#M7960</link>
      <description>&lt;P&gt;Yep and indeed true. I should have mentioned a clause with question mark(?) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 15:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544910#M7960</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-03-21T15:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544929#M7962</link>
      <description>&lt;P&gt;Thank you so much guys! That really helped me understand things better!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 16:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544929#M7962</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2019-03-21T16:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date Step and Proc Step</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544939#M7963</link>
      <description>&lt;P&gt;One last question, but _N_ and _ERROR_ are available for PROC IMPORT? Since PROC IMPORT also creates a PDV? The book wasn't very clear on PROC IMPORT. Here's all the contents the book has on PROC IMPORT, it's right after the Iteration of the Data Step section, under a PDV figure and a SAS Data Set Output,&amp;nbsp;so I'm assuming it also has a PDV?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When PROC IMPORT reads raw data, SAS sets the value of each variable in the DATA step to missing at the beginning of each cycle of execution, with these exceptions:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1. variable that are named in a RETAIN statement&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2. variables that are created in a sum statement&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3. automatic variables&lt;/P&gt;&lt;P&gt;In Contrast, when reading variables from a SAS data set, SAS sets the values to missing only before the first cycle of execution of the DATA step. Therefore, the variables retain their values until new values become available(for example, through an assignment statement or through the next execution of a SET or MERGE statement). Variables that are created with options in a SET or MERGE statement also retain their values from one cycle of execution to the next.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also assuming the second paragraph is still referring to PROC IMPORT.&lt;/P&gt;&lt;P&gt;1.So does this mean that PDV and the&amp;nbsp;two automatic variables _N_ and _ERROR_ &amp;nbsp;are&amp;nbsp;created in all DATA Steps and also&amp;nbsp;created in PROC IMPORT but not other PROC Steps?&lt;/P&gt;&lt;P&gt;2.The key difference between PROC IMPORT and a DATA Step&amp;nbsp;is when reading SAS data sets, PROC IMPORT retains the value until new values are available while DATA Step resets the values to missing in each new iteration?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 16:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Date-Step-and-Proc-Step/m-p/544939#M7963</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2019-03-21T16:39:12Z</dc:date>
    </item>
  </channel>
</rss>

