<?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 does Data _null_  ; do? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739813#M230965</link>
    <description>&lt;PRE&gt;Data sales;
Input dept: $10.  Jan feb mar;
Datlines;
Shoes 4344 355 266
Houseware 33 44 55
;
Data _null_;
Set sales;
qtrTot = jan + feb + mar;
put ‘total quarterly sales: ‘
qtrtot dollar12.:
Run;
&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 May 2021 15:57:39 GMT</pubDate>
    <dc:creator>GN0001</dc:creator>
    <dc:date>2021-05-07T15:57:39Z</dc:date>
    <item>
      <title>What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739813#M230965</link>
      <description>&lt;PRE&gt;Data sales;
Input dept: $10.  Jan feb mar;
Datlines;
Shoes 4344 355 266
Houseware 33 44 55
;
Data _null_;
Set sales;
qtrTot = jan + feb + mar;
put ‘total quarterly sales: ‘
qtrtot dollar12.:
Run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 May 2021 15:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739813#M230965</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-07T15:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739817#M230968</link>
      <description>&lt;P&gt;In the present scenario it does not create any new dataset.&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739817#M230968</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-07T16:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739821#M230971</link>
      <description>Thanks for the response.&lt;BR /&gt;Is its result used in another statement?&lt;BR /&gt;Is it save in memory for further use?&lt;BR /&gt;Regards,&lt;BR /&gt;Blue Blue</description>
      <pubDate>Fri, 07 May 2021 16:07:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739821#M230971</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-07T16:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739822#M230972</link>
      <description>&lt;P&gt;It can be used when you want to use data step logic/processing to either create code (call execute), create macro variables (call symputx), or write to an external tex file (file) without also creating a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are other uses, but those are some of the most common.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739822#M230972</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-07T16:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739831#M230979</link>
      <description>&lt;P&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1kh25to5o0wmvn1o4n4hsl3yyww.htm#p1azvbc8d78hxjn15v84mhwskjln" target="_self"&gt;If _NULL_ is specified as the data set name, SAS does not create a data set when it executes the DATA step. For an example, see Creating a Custom Report.&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Follow the link for more information&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 16:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739831#M230979</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-05-07T16:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739837#M230983</link>
      <description>Within the same data step yes.&lt;BR /&gt;Since no data step is created  no disk space is needed,</description>
      <pubDate>Fri, 07 May 2021 16:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739837#M230983</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-07T16:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: What does Data _null_  ; do?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739845#M230990</link>
      <description>&lt;P&gt;The data _null_ allows you use SAS coding in data step that does not require creating a new data set.&lt;/P&gt;
&lt;P&gt;Expensive pocket calculator:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Data _null_;
   x = 1 + 2 + 3 + 4 + 5;
   put x= ;
run;&lt;/PRE&gt;
&lt;P&gt;Puts the result to the log&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write to the results window:&lt;/P&gt;
&lt;PRE&gt;Data _null_;
  file print;
   x = 1 + 2 + 3 + 4 + 5;
   put x= ;
run;&lt;/PRE&gt;
&lt;P&gt;Write to an external file:&lt;/P&gt;
&lt;PRE&gt;Data _null_;
   file "c:\folder\sometextfile.txt";
   x = 1 + 2 + 3 + 4 + 5;
   put x= ;
run;&lt;/PRE&gt;
&lt;P&gt;With data on a SET statement then you can write any of that out, such as create custom file layout that Proc Print wouldn't. 30 years ago I worked for an agency that used this approach to write text markup that our fancy (read big as car) high production laser printer used to make "nice" tables and graphics that we called "Proc AnnualReport".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This usage has been expanded with the File ODS and/ or the Report writing interface.&lt;/P&gt;
&lt;P&gt;Create macro variables with Call symputx/symput.&lt;/P&gt;
&lt;P&gt;Create calls to Call Execute that stacks code into the execution buffer for execution after the data step terminates.&lt;/P&gt;
&lt;P&gt;Make noise&amp;nbsp; (I used to use this to tell me when some longish running jobs were finished )&lt;/P&gt;
&lt;PRE&gt;data _null_;
   call sound(523,2000);
run;&lt;/PRE&gt;
&lt;P&gt;Generally do something that does not require creating an output data set when you want to use data or fixed elements of coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 17:09:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-does-Data-null-do/m-p/739845#M230990</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-07T17:09:39Z</dc:date>
    </item>
  </channel>
</rss>

