<?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: Display all variables  in a zero data set in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9182#M2930</link>
    <description>Hi:&lt;BR /&gt;
  I'm confused -- you're using the DATA step and not PROC SQL for the subset??? What do you mean by "other columns"??? If PLAN, PARA, CRITERIA, VALUE1 and VALUE2 are the column headers, then what are the values A, B, XXX and YYYY -- are those COLUMN NAMES or COLUMN VALUES????&lt;BR /&gt;
 &lt;BR /&gt;
I don't understand how you are even seeing column headers. When I run this PROC REPORT and ask for a subset with 0 observations, nothing is displayed at all -- not even headers:&lt;BR /&gt;
[pre]&lt;BR /&gt;
2552  ods listing;&lt;BR /&gt;
2553  ods html file='c:\what_is_report.html' style=sasweb;&lt;BR /&gt;
NOTE: Writing HTML Body file: c:\what_is_report.html&lt;BR /&gt;
2554  proc report data=sashelp.class nowd;&lt;BR /&gt;
2555  where age = 17;&lt;BR /&gt;
2556  run;&lt;BR /&gt;
                     &lt;BR /&gt;
NOTE: No observations were selected from data set SASHELP.CLASS.&lt;BR /&gt;
NOTE: No observations in input data set.&lt;BR /&gt;
NOTE: There were 0 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
      WHERE age=17;&lt;BR /&gt;
NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
                    &lt;BR /&gt;
2557  ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And, even if I use a DATA step to do the subset, I still do not get any report -- only the following messages about 0 observations:&lt;BR /&gt;
[pre]&lt;BR /&gt;
2567  data newclass;&lt;BR /&gt;
2568    set sashelp.class;&lt;BR /&gt;
2569    where age = 17;&lt;BR /&gt;
2570  run;&lt;BR /&gt;
                                       &lt;BR /&gt;
NOTE: There were 0 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
      WHERE age=17;&lt;BR /&gt;
NOTE: The data set WORK.NEWCLASS has 0 observations and 5 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
                                    &lt;BR /&gt;
2571&lt;BR /&gt;
2572  ods listing;&lt;BR /&gt;
2573  ods html file='c:\what_is_report2.html' style=sasweb;&lt;BR /&gt;
NOTE: Writing HTML Body file: c:\what_is_report2.html&lt;BR /&gt;
2574  proc report data=newclass nowd;&lt;BR /&gt;
2575  run;&lt;BR /&gt;
                              &lt;BR /&gt;
NOTE: No observations in data set WORK.NEWCLASS.&lt;BR /&gt;
NOTE: No observations in input data set.&lt;BR /&gt;
NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
                                &lt;BR /&gt;
2576  ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
   &lt;BR /&gt;
There are no observations with AGE=17 in SASHELP.CLASS. It would help if you showed your complete code and/or your code in the SAS log (with messages).&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
    <pubDate>Wed, 29 Sep 2010 20:28:15 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2010-09-29T20:28:15Z</dc:date>
    <item>
      <title>Display all variables  in a zero data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9181#M2929</link>
      <description>This might sound weird.  I am subsetting a data set to proc report it, after subsetting, the resulting data set has zero observation,so only the column headings are dispalyed but not the rows below them.  For reporting purpose i need the other columns to be displayed, eventhough the corresponding values to those rows dont exist.&lt;BR /&gt;
&lt;BR /&gt;
For eg.  after subsetting i want the table to be displayed as below&lt;BR /&gt;
&lt;BR /&gt;
plan    para   criteria   value1 value2&lt;BR /&gt;
&lt;BR /&gt;
A         XXX    YYYY      .            .&lt;BR /&gt;
&lt;BR /&gt;
B        XXX    YYYY      .            .&lt;BR /&gt;
&lt;BR /&gt;
I am using data step not SQL.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Wed, 29 Sep 2010 19:58:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9181#M2929</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-29T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Display all variables  in a zero data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9182#M2930</link>
      <description>Hi:&lt;BR /&gt;
  I'm confused -- you're using the DATA step and not PROC SQL for the subset??? What do you mean by "other columns"??? If PLAN, PARA, CRITERIA, VALUE1 and VALUE2 are the column headers, then what are the values A, B, XXX and YYYY -- are those COLUMN NAMES or COLUMN VALUES????&lt;BR /&gt;
 &lt;BR /&gt;
I don't understand how you are even seeing column headers. When I run this PROC REPORT and ask for a subset with 0 observations, nothing is displayed at all -- not even headers:&lt;BR /&gt;
[pre]&lt;BR /&gt;
2552  ods listing;&lt;BR /&gt;
2553  ods html file='c:\what_is_report.html' style=sasweb;&lt;BR /&gt;
NOTE: Writing HTML Body file: c:\what_is_report.html&lt;BR /&gt;
2554  proc report data=sashelp.class nowd;&lt;BR /&gt;
2555  where age = 17;&lt;BR /&gt;
2556  run;&lt;BR /&gt;
                     &lt;BR /&gt;
NOTE: No observations were selected from data set SASHELP.CLASS.&lt;BR /&gt;
NOTE: No observations in input data set.&lt;BR /&gt;
NOTE: There were 0 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
      WHERE age=17;&lt;BR /&gt;
NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
                    &lt;BR /&gt;
2557  ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And, even if I use a DATA step to do the subset, I still do not get any report -- only the following messages about 0 observations:&lt;BR /&gt;
[pre]&lt;BR /&gt;
2567  data newclass;&lt;BR /&gt;
2568    set sashelp.class;&lt;BR /&gt;
2569    where age = 17;&lt;BR /&gt;
2570  run;&lt;BR /&gt;
                                       &lt;BR /&gt;
NOTE: There were 0 observations read from the data set SASHELP.CLASS.&lt;BR /&gt;
      WHERE age=17;&lt;BR /&gt;
NOTE: The data set WORK.NEWCLASS has 0 observations and 5 variables.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
                                    &lt;BR /&gt;
2571&lt;BR /&gt;
2572  ods listing;&lt;BR /&gt;
2573  ods html file='c:\what_is_report2.html' style=sasweb;&lt;BR /&gt;
NOTE: Writing HTML Body file: c:\what_is_report2.html&lt;BR /&gt;
2574  proc report data=newclass nowd;&lt;BR /&gt;
2575  run;&lt;BR /&gt;
                              &lt;BR /&gt;
NOTE: No observations in data set WORK.NEWCLASS.&lt;BR /&gt;
NOTE: No observations in input data set.&lt;BR /&gt;
NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
                                &lt;BR /&gt;
2576  ods html close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
   &lt;BR /&gt;
There are no observations with AGE=17 in SASHELP.CLASS. It would help if you showed your complete code and/or your code in the SAS log (with messages).&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 29 Sep 2010 20:28:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9182#M2930</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-29T20:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Display all variables  in a zero data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9183#M2931</link>
      <description>What you are saying  is right. I dont see any observations or coulmn heading displayed if i just run the program. When i go into explorer window and try to open the sas table at that point i can see the column headings.&lt;BR /&gt;
&lt;BR /&gt;
what are the values A, B, XXX and YYYY -- are those COLUMN NAMES or COLUMN VALUES????&lt;BR /&gt;
&lt;BR /&gt;
They are values.&lt;BR /&gt;
&lt;BR /&gt;
Any way i want the no observation table to be displayed for reporting purpose, to show that their are no observation.</description>
      <pubDate>Wed, 29 Sep 2010 20:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9183#M2931</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-29T20:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display all variables  in a zero data set</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9184#M2932</link>
      <description>Hi:&lt;BR /&gt;
  You might want to search the previous forum postings or do a Google search -- this question has come up a lot. As you have discovered, there's no SAS procedure that will "automatically" give you a report with 0 rows.&lt;BR /&gt;
&lt;BR /&gt;
  So, you will have to use one of the previously posted solutions. Most folks just want to display a message that there were 0 observations. If you want to display an "empty" dataset with column headers and missing values for all the variables, then you will probably have to make such a dataset using programming techniques.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 29 Sep 2010 21:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Display-all-variables-in-a-zero-data-set/m-p/9184#M2932</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-09-29T21:15:31Z</dc:date>
    </item>
  </channel>
</rss>

