<?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: Proc report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199582#M13324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I agree that you are controlling whether the LINE output displays or not based on the value for the LEN variable. But you are NOT, technically, conditionally executing the LINE statement (the LINE statement is not on the THEN or ELSE branch). What you are doing conditionally is setting the value for the LEN variable. The fact is that when LEN is 0, the LINE statement will suppress its output -- but the LINE statement is technically, still being executed because it has to discover the value of 0 for LEN, which has the impact of suppressing any display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Also, based on the example the OP posted in a different location, the value of TEST2 is on a single LINE with OTHER variable values -- the example LINE statement shows TEST1. So my take on the question was that the OP still wants the TEST1 part of the line to display -- not to be suppressed altogether. That is why I posted using a "helper" variable to hold 2 different strings instead of showing the way to suppress an entire line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 06:09:06 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-06-05T06:09:06Z</dc:date>
    <item>
      <title>Proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199579#M13321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all&lt;/P&gt;&lt;P&gt;i am generating subtitles for a report and I'm using compute before _page_ &lt;/P&gt;&lt;P&gt;line @1 test1 $20 test2 $20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i should not display test2 if it's empty&amp;nbsp; otherswIse I need to display, how can I achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 03:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199579#M13321</guid>
      <dc:creator>SASSLICK001</dc:creator>
      <dc:date>2015-06-04T03:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199580#M13322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI:&lt;/P&gt;&lt;P&gt;&amp;nbsp; You will have to use conditional logic in your COMPUTE block. But, you cannot execute LINE statements conditionally. (That is another argument against using the @20 pointer control in your LINE statement.) YOu will need to make a helper variable, a temporary variable such as PRTLINE in the example code below. Probably something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;COMPUTE ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; length prtline $100;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; if test2 = . then prtline = 'one thing'; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; else if test2 gt . then prtline='another';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; line prtline $100.;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ENDCOMP:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 11:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199580#M13322</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-04T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199581#M13323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a way to conditional execute LINE statement via format $VARYING. ;&lt;/P&gt;&lt;P&gt;Here is an example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #353535; font-family: Lato, sans-serif; font-size: 14px;"&gt;&lt;/P&gt;&lt;DIV class="sce-html-export" style="font-family: 'Courier New', Menlo, 'Lucida Console';"&gt;&lt;PRE class="sce-render" style="font-family: 'Courier New', Menlo, 'Lucida Console'; font-size: 16px;"&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;report&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;data&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sashelp.class&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;nowd&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;column&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sex&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;weight&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;height&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;define&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sex&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;order&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;define&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;weight&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;display&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;define&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;height&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;/&lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;display&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;compute&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;weight&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sex&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'F'&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;then&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;len&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;else&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;len&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;20&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;compute&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;after&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sex&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;line&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;@&lt;/SPAN&gt;&lt;SPAN class="numeric" style="color: #008080; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="string" style="color: #800080;"&gt;'sex : '&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;sex&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="format" style="color: #008080;"&gt;$varying100.&lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN class="text" style="color: black;"&gt;len&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword" style="color: #0000ff;"&gt;endcomp&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sec-keyword" style="color: #000080; font-weight: bold;"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep" style="color: black;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN class="sep" style="color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 12:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199581#M13323</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-06-04T12:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199582#M13324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I agree that you are controlling whether the LINE output displays or not based on the value for the LEN variable. But you are NOT, technically, conditionally executing the LINE statement (the LINE statement is not on the THEN or ELSE branch). What you are doing conditionally is setting the value for the LEN variable. The fact is that when LEN is 0, the LINE statement will suppress its output -- but the LINE statement is technically, still being executed because it has to discover the value of 0 for LEN, which has the impact of suppressing any display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Also, based on the example the OP posted in a different location, the value of TEST2 is on a single LINE with OTHER variable values -- the example LINE statement shows TEST1. So my take on the question was that the OP still wants the TEST1 part of the line to display -- not to be suppressed altogether. That is why I posted using a "helper" variable to hold 2 different strings instead of showing the way to suppress an entire line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 06:09:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-report/m-p/199582#M13324</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-05T06:09:06Z</dc:date>
    </item>
  </channel>
</rss>

