<?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 What is the order of being added to PDV ? in Programming 1 and 2</title>
    <link>https://communities.sas.com/t5/Programming-1-and-2/What-is-the-order-of-being-added-to-PDV/m-p/730872#M733</link>
    <description>&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the lesson 1 programming 2 (Data step processing: Compilation).&lt;/P&gt;
&lt;P&gt;The theory is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"&lt;EM&gt;To&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&amp;nbsp;build&amp;nbsp;the&amp;nbsp;PDV,&amp;nbsp;SAS&amp;nbsp;passes&amp;nbsp;through&amp;nbsp;the&amp;nbsp;DATA&amp;nbsp;step&amp;nbsp;sequentially,&amp;nbsp;adding&amp;nbsp;columns&amp;nbsp;and&amp;nbsp;their&amp;nbsp;attributes.&amp;nbsp;The&amp;nbsp;SET&amp;nbsp;statement&amp;nbsp;in&amp;nbsp;this&amp;nbsp;program&amp;nbsp;is&amp;nbsp;listed&amp;nbsp;first,&amp;nbsp;so&amp;nbsp;all&amp;nbsp;of&amp;nbsp;the&amp;nbsp;columns&amp;nbsp;from&amp;nbsp;the&amp;nbsp;storm_summary_small&amp;nbsp;table&amp;nbsp;are&amp;nbsp;added&amp;nbsp;to&amp;nbsp;the&amp;nbsp;PDV&amp;nbsp;along&amp;nbsp;with&amp;nbsp;the&amp;nbsp;required&amp;nbsp;column&amp;nbsp;attributes&amp;nbsp;name,&amp;nbsp;type,&amp;nbsp;and&amp;nbsp;length.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If&amp;nbsp;there&amp;nbsp;are&amp;nbsp;any&amp;nbsp;other&amp;nbsp;statements&amp;nbsp;that&amp;nbsp;define&amp;nbsp;new&amp;nbsp;columns,&amp;nbsp;those&amp;nbsp;columns&amp;nbsp;are&amp;nbsp;also&amp;nbsp;added&amp;nbsp;to&amp;nbsp;the&amp;nbsp;PDV.&amp;nbsp;In&amp;nbsp;this&amp;nbsp;code,&amp;nbsp;the&amp;nbsp;LENGTH&amp;nbsp;statement&amp;nbsp;defines&amp;nbsp;the&amp;nbsp;character&amp;nbsp;column&amp;nbsp;Ocean&amp;nbsp;with&amp;nbsp;a&amp;nbsp;length&amp;nbsp;of&amp;nbsp;8.&amp;nbsp;StormLength&amp;nbsp;is&amp;nbsp;the&amp;nbsp;last&amp;nbsp;new&amp;nbsp;column,&amp;nbsp;and&amp;nbsp;based&amp;nbsp;on&amp;nbsp;the&amp;nbsp;arithmetic&amp;nbsp;expression,&amp;nbsp;it's&amp;nbsp;defined&amp;nbsp;as&amp;nbsp;a&amp;nbsp;numeric&amp;nbsp;column&amp;nbsp;with&amp;nbsp;a&amp;nbsp;length&amp;nbsp;of&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;8.&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The lecture note is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ResoluteCarbon_0-1617314719594.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56826i36CF70B4757A051B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ResoluteCarbon_0-1617314719594.png" alt="ResoluteCarbon_0-1617314719594.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;what I want to focus is the column "Basin". I am wondering why the column Basin is at this position. Because SAS will go through all the codes sequentially. So, they will exclude the old Basin and add a new Basin column at the end of the yellow table in PDV when stopping by the data statement&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Basin=upcase(Basin);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 22:07:34 GMT</pubDate>
    <dc:creator>ResoluteCarbon</dc:creator>
    <dc:date>2021-04-01T22:07:34Z</dc:date>
    <item>
      <title>What is the order of being added to PDV ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/What-is-the-order-of-being-added-to-PDV/m-p/730872#M733</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the lesson 1 programming 2 (Data step processing: Compilation).&lt;/P&gt;
&lt;P&gt;The theory is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"&lt;EM&gt;To&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&amp;nbsp;build&amp;nbsp;the&amp;nbsp;PDV,&amp;nbsp;SAS&amp;nbsp;passes&amp;nbsp;through&amp;nbsp;the&amp;nbsp;DATA&amp;nbsp;step&amp;nbsp;sequentially,&amp;nbsp;adding&amp;nbsp;columns&amp;nbsp;and&amp;nbsp;their&amp;nbsp;attributes.&amp;nbsp;The&amp;nbsp;SET&amp;nbsp;statement&amp;nbsp;in&amp;nbsp;this&amp;nbsp;program&amp;nbsp;is&amp;nbsp;listed&amp;nbsp;first,&amp;nbsp;so&amp;nbsp;all&amp;nbsp;of&amp;nbsp;the&amp;nbsp;columns&amp;nbsp;from&amp;nbsp;the&amp;nbsp;storm_summary_small&amp;nbsp;table&amp;nbsp;are&amp;nbsp;added&amp;nbsp;to&amp;nbsp;the&amp;nbsp;PDV&amp;nbsp;along&amp;nbsp;with&amp;nbsp;the&amp;nbsp;required&amp;nbsp;column&amp;nbsp;attributes&amp;nbsp;name,&amp;nbsp;type,&amp;nbsp;and&amp;nbsp;length.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If&amp;nbsp;there&amp;nbsp;are&amp;nbsp;any&amp;nbsp;other&amp;nbsp;statements&amp;nbsp;that&amp;nbsp;define&amp;nbsp;new&amp;nbsp;columns,&amp;nbsp;those&amp;nbsp;columns&amp;nbsp;are&amp;nbsp;also&amp;nbsp;added&amp;nbsp;to&amp;nbsp;the&amp;nbsp;PDV.&amp;nbsp;In&amp;nbsp;this&amp;nbsp;code,&amp;nbsp;the&amp;nbsp;LENGTH&amp;nbsp;statement&amp;nbsp;defines&amp;nbsp;the&amp;nbsp;character&amp;nbsp;column&amp;nbsp;Ocean&amp;nbsp;with&amp;nbsp;a&amp;nbsp;length&amp;nbsp;of&amp;nbsp;8.&amp;nbsp;StormLength&amp;nbsp;is&amp;nbsp;the&amp;nbsp;last&amp;nbsp;new&amp;nbsp;column,&amp;nbsp;and&amp;nbsp;based&amp;nbsp;on&amp;nbsp;the&amp;nbsp;arithmetic&amp;nbsp;expression,&amp;nbsp;it's&amp;nbsp;defined&amp;nbsp;as&amp;nbsp;a&amp;nbsp;numeric&amp;nbsp;column&amp;nbsp;with&amp;nbsp;a&amp;nbsp;length&amp;nbsp;of&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;8.&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The lecture note is:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ResoluteCarbon_0-1617314719594.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56826i36CF70B4757A051B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ResoluteCarbon_0-1617314719594.png" alt="ResoluteCarbon_0-1617314719594.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;what I want to focus is the column "Basin". I am wondering why the column Basin is at this position. Because SAS will go through all the codes sequentially. So, they will exclude the old Basin and add a new Basin column at the end of the yellow table in PDV when stopping by the data statement&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Basin=upcase(Basin);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 22:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/What-is-the-order-of-being-added-to-PDV/m-p/730872#M733</guid>
      <dc:creator>ResoluteCarbon</dc:creator>
      <dc:date>2021-04-01T22:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the order of being added to PDV ?</title>
      <link>https://communities.sas.com/t5/Programming-1-and-2/What-is-the-order-of-being-added-to-PDV/m-p/730877#M734</link>
      <description>&lt;P&gt;Huh?&lt;/P&gt;
&lt;P&gt;This statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Basin=upcase(Basin);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is not going to make a new variable.&amp;nbsp; It is going the change the value of the current variable.&lt;/P&gt;
&lt;P&gt;The only way it would make a new variable would be if BASIN had not been seen before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you look at the first three lines of the DATA step and the picture showing the order of the variables you can KNOW that BASIN was defined because it appeared in the input dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you see why you can know that?&lt;/P&gt;
&lt;LI-SPOILER&gt;Ocean is the first variable mentioned explicitly in the code.&amp;nbsp; Since it is the 6th variable in the photograph of the order that means the five before it must have come from PG2.STORM_SUMMARY_SMALL.&lt;/LI-SPOILER&gt;</description>
      <pubDate>Thu, 01 Apr 2021 22:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Programming-1-and-2/What-is-the-order-of-being-added-to-PDV/m-p/730877#M734</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-01T22:58:01Z</dc:date>
    </item>
  </channel>
</rss>

