<?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: is PDV apply while writing the data _null_? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811037#M319884</link>
    <description>&lt;P&gt;Why do you think that the pdv-concept is not applied in a data _null_ step?&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2022 10:46:19 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2022-05-02T10:46:19Z</dc:date>
    <item>
      <title>is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811034#M319881</link>
      <description>&lt;P&gt;/*example1*/&lt;/P&gt;
&lt;P&gt;data ex1;&lt;/P&gt;
&lt;P&gt;set sashelp.class ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;Note: (exmaple1) In above step backend PDV concept will be executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*example2*/&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;set sashelp.class;&lt;/P&gt;
&lt;P&gt;put _all_;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my question is like in above step (example2) is backend PDV concept will be applied .&lt;BR /&gt;i think not applied . Could you please guide me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 10:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811034#M319881</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2022-05-02T10:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811037#M319884</link>
      <description>&lt;P&gt;Why do you think that the pdv-concept is not applied in a data _null_ step?&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 10:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811037#M319884</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-05-02T10:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811042#M319887</link>
      <description>&lt;P&gt;The PDV (program data vector) is present/used in DATA step even when you aren't writing an output data set. To see it in action and get more insight into how it works, use &lt;A href="https://communities.sas.com/t5/Ask-the-Expert/How-do-I-debug-SAS-DATA-Step-Q-amp-A-Slides-and-On-Demand/ta-p/806629" target="_self"&gt;the DATA step debugger (tutorial here)&lt;/A&gt;. It's a great learning tool.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 11:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811042#M319887</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-05-02T11:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811044#M319889</link>
      <description>No.of iterations won't be formed in new dataset (just an idea)&lt;BR /&gt;&lt;BR /&gt;Can you guide exact point?</description>
      <pubDate>Mon, 02 May 2022 11:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811044#M319889</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2022-05-02T11:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811058#M319897</link>
      <description>&lt;P&gt;As Chris wrote, the PDV is a logical component of the DATA step itself.&amp;nbsp; If you are writing a DATA step, it has a PDV.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your&amp;nbsp; sample code code when you use the PUT statement, you are writing values from the PDV to the log.&amp;nbsp; I added a BY statement for fun, and here is the log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1    data _null_ ;
2      set sashelp.class ;
3      by name ;
4      put _all_;
5    run ;

Name=Alfred Sex=M Age=14 Height=69 Weight=112.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=1
Name=Alice Sex=F Age=13 Height=56.5 Weight=84 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=2
Name=Barbara Sex=F Age=13 Height=65.3 Weight=98 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=3
Name=Carol Sex=F Age=14 Height=62.8 Weight=102.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=4
Name=Henry Sex=M Age=14 Height=63.5 Weight=102.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=5
Name=James Sex=M Age=12 Height=57.3 Weight=83 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=6
Name=Jane Sex=F Age=12 Height=59.8 Weight=84.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=7
Name=Janet Sex=F Age=15 Height=62.5 Weight=112.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=8
Name=Jeffrey Sex=M Age=13 Height=62.5 Weight=84 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=9
Name=John Sex=M Age=12 Height=59 Weight=99.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=10
Name=Joyce Sex=F Age=11 Height=51.3 Weight=50.5 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=11
Name=Judy Sex=F Age=14 Height=64.3 Weight=90 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=12
Name=Louise Sex=F Age=12 Height=56.3 Weight=77 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=13
Name=Mary Sex=F Age=15 Height=66.5 Weight=112 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=14
Name=Philip Sex=M Age=16 Height=72 Weight=150 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=15
Name=Robert Sex=M Age=12 Height=64.8 Weight=128 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=16
Name=Ronald Sex=M Age=15 Height=67 Weight=133 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=17
Name=Thomas Sex=M Age=11 Height=57.5 Weight=85 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=18
Name=William Sex=M Age=15 Height=66.5 Weight=112 FIRST.Name=1 LAST.Name=1 _ERROR_=0 _N_=19
NOTE: There were 19 observations read from the data set SASHELP.CLASS.

&lt;/PRE&gt;
&lt;P&gt;You can see there are 9 variables in the PDV.&amp;nbsp; Five are read from sashelp.class.&amp;nbsp; Four are automatic variables created by SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The data step works by creating the PDV, reading values into the PDV, changing values in the PDV, then writing values from the PDV.&amp;nbsp; There is always a PDV.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As can be seen above, the counter of DATA step iterations, _N_, is always present in the PDV.&amp;nbsp; The automatic variables _N_ _ERROR_ FIRST.Name LAST.Name are not written to an output dataset, but they exist in the PDV.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;+1 For Chris's recommendation to play around with the DATA step debugger.&amp;nbsp; Learning about the PDV is critical to understanding the DATA step, which is critical to understanding SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811058#M319897</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-05-02T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: is PDV apply while writing the data _null_?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811059#M319898</link>
      <description>&lt;P&gt;The PDV is constructed by the SAS compiler - in advance of actual data processing.&amp;nbsp; &amp;nbsp;Before any data processing occurs, the compiler makes provision for each variable encountered in a SET, MERGE, INPUT and other data-retrieval statements as well as assignment statements that will calculate values for new variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And remember, a DATA _NULL_ step does process data, so it would need the PDV to keep variables organized during that process.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:05:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-PDV-apply-while-writing-the-data-null/m-p/811059#M319898</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-05-02T13:05:52Z</dc:date>
    </item>
  </channel>
</rss>

