<?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 Proc Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350603#M81505</link>
    <description>&lt;P&gt;libname learn xlsx '/folders/myshortcuts/s2/hosp.xlsx';&lt;BR /&gt;proc report data=learn.hosp nowd headline;&lt;BR /&gt;column subject AdmitDAte DOB Age;&lt;BR /&gt;define AdmitDate/"Admission Date" width=10;&lt;BR /&gt;define DOB/width=3 ;&lt;BR /&gt;define subject/display width=7;&lt;BR /&gt;define Age/computed "Age at admission" ;&lt;BR /&gt;compute Age;&lt;BR /&gt;Age=round(yrdif(DOB,AdmitDate,'Actual'));&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log consists of following statements:&lt;/P&gt;&lt;DIV class="sasNote"&gt;Variable DOB is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable AdmitDate is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Output:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;In output Age is comming as missing variriable.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Please help me out with this situation.Please refer the screenshot for output.&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13719i1BD1FCCD9C1D479E/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="doubt.png" title="doubt.png" /&gt;</description>
    <pubDate>Mon, 17 Apr 2017 18:52:12 GMT</pubDate>
    <dc:creator>s_m</dc:creator>
    <dc:date>2017-04-17T18:52:12Z</dc:date>
    <item>
      <title>Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350603#M81505</link>
      <description>&lt;P&gt;libname learn xlsx '/folders/myshortcuts/s2/hosp.xlsx';&lt;BR /&gt;proc report data=learn.hosp nowd headline;&lt;BR /&gt;column subject AdmitDAte DOB Age;&lt;BR /&gt;define AdmitDate/"Admission Date" width=10;&lt;BR /&gt;define DOB/width=3 ;&lt;BR /&gt;define subject/display width=7;&lt;BR /&gt;define Age/computed "Age at admission" ;&lt;BR /&gt;compute Age;&lt;BR /&gt;Age=round(yrdif(DOB,AdmitDate,'Actual'));&lt;BR /&gt;endcomp;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;log consists of following statements:&lt;/P&gt;&lt;DIV class="sasNote"&gt;Variable DOB is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable AdmitDate is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Output:&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;In output Age is comming as missing variriable.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Please help me out with this situation.Please refer the screenshot for output.&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13719i1BD1FCCD9C1D479E/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="doubt.png" title="doubt.png" /&gt;</description>
      <pubDate>Mon, 17 Apr 2017 18:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350603#M81505</guid>
      <dc:creator>s_m</dc:creator>
      <dc:date>2017-04-17T18:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350609#M81509</link>
      <description>After adding display in DOB and AdmitDate Code is working fine.Value for Age is coming.Please explain why we need display for this.I have already mention display for subject,So it will automatically force display for all other variables.Why only after adding display Age is being computed?</description>
      <pubDate>Mon, 17 Apr 2017 19:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350609#M81509</guid>
      <dc:creator>s_m</dc:creator>
      <dc:date>2017-04-17T19:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350613#M81512</link>
      <description>in your picture (doubt.png), the variable labels are being displayed.   It is possible that DOB is the label and not the actual variable name.  The same may be true for AdmitDate.&lt;BR /&gt;&lt;BR /&gt;Also make sure that both are SAS dates.</description>
      <pubDate>Mon, 17 Apr 2017 19:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350613#M81512</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2017-04-17T19:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350615#M81513</link>
      <description>&lt;P&gt;The define usage of a report item is assigned to each variable individually.&amp;nbsp; You have verified that DOB is numeric, therefore its default define usage is ANALYSIS.&amp;nbsp; Character variables have a default usage of DISPLAY.&amp;nbsp; For completeness i like to always specify the define usage on each DEFINE statement - even when i think that it is redundant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem specifically for you in this case is that for report items with a define usage of ANALYSIS their names are not used directly within a compute block.&amp;nbsp; You can read more about this here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/In_The_Compute_Block:_Issues_Associated_with_Using_and_Naming_Variables" target="_self"&gt;http://www.sascommunity.org/wiki/In_The_Compute_Block:_Issues_Associated_with_Using_and_Naming_Variables&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The variable names are used explicitly when the usage is DISPLAY.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 19:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report/m-p/350615#M81513</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2017-04-17T19:24:29Z</dc:date>
    </item>
  </channel>
</rss>

