<?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: Why does CALL DEFINE not accept the column name? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776142#M25427</link>
    <description>&lt;P&gt;Makes sense. But why does the alias work without .sum? Is the alias in fact applied to the statistic, and not the variable as such?&lt;/P&gt;</description>
    <pubDate>Mon, 25 Oct 2021 08:15:35 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-10-25T08:15:35Z</dc:date>
    <item>
      <title>Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/775653#M25413</link>
      <description>&lt;P&gt;According to the documentation, the first parameter to CALL DEFINE (column-id) is (among others)&lt;/P&gt;
&lt;UL class="xisDoc-listUnordered"&gt;
&lt;LI class="xisDoc-item"&gt;a character literal (in quotation marks) that is the column name&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Why is the column name not accepted in this example code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value myfmt 100-high="high";
run;

proc report data=sashelp.class;
column name age;
define name / display;
define age / sum;
rbreak after / summarize;
compute after;
  name = "total";
  call define ("age","format","myfmt.");
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It works with either the numerical column number (2) or the sequential column name ("_c2_").&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it works if an alias is used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.class;
column name age=xxx;
define name / display;
define xxx / sum;
/*compute age;
if _break_ = "_RBREAK_" then call define (_col_,"format","3.");
endcomp;*/
rbreak after / summarize;
compute after;
  name = "total";
  call define ("xxx","format","myfmt.");
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So what is the difference between the column name itself and the alias?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 13:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/775653#M25413</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-21T13:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/775665#M25414</link>
      <description>&lt;P&gt;The name is AGE.SUM for an analysis variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call define ("age.sum","format","myfmt.");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 14:43:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/775665#M25414</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2021-10-21T14:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776142#M25427</link>
      <description>&lt;P&gt;Makes sense. But why does the alias work without .sum? Is the alias in fact applied to the statistic, and not the variable as such?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 08:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776142#M25427</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-25T08:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776193#M25428</link>
      <description>Hi:&lt;BR /&gt;  It is one of the referencing rules of PROC REPORT. In a COMPUTE block GROUP, ORDER and DISPLAY items can use the simple column name reference. ANALYSIS items must use the referencing form of variable.statistic. An analysis item that uses an alias can use the simple alias name. An exception to this rule would be any item under an ACROSS usage variable. An ANALYSIS item or an ALIAS item under an ACROSS item would need to use the absolute column number in a COMPUTE block. &lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 25 Oct 2021 13:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776193#M25428</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-10-25T13:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776239#M25429</link>
      <description>&lt;P&gt;That somehow led me to the relevant piece of documentation that describes it..&lt;/P&gt;
&lt;P&gt;Thank you to all!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 17:16:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/776239#M25429</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-25T17:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779450#M25456</link>
      <description>Is there a way to find the absolute column numbers of columns without preprocessing the data?&lt;BR /&gt;&lt;BR /&gt;Just to make up a simple example of when that might be useful, let's suppose I have some id columns, and then across columns for a variable, then a summary column, and I want to make the last across column pink.  If I knew the column number of the final summary column, I could find the column number of the last across column by subtracting 1.  &lt;BR /&gt;&lt;BR /&gt;I have occasionally had reason to run a PROC SUMMARY on data, and then PROC REPORT on the summary output.  It surprised me that sometimes with large data sets the SUMMARY+REPORT approach was noticeably faster than creating the same final report using PROC REPORT alone.  I would have thought the run times would be very similar because the same calculation engine is used in both.  &lt;BR /&gt;</description>
      <pubDate>Tue, 09 Nov 2021 22:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779450#M25456</guid>
      <dc:creator>JackHamilton</dc:creator>
      <dc:date>2021-11-09T22:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779452#M25457</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13901"&gt;@JackHamilton&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Is there a way to find the absolute column numbers of columns without preprocessing the data?&lt;BR /&gt;&lt;BR /&gt;Just to make up a simple example of when that might be useful, let's suppose I have some id columns, and then across columns for a variable, then a summary column, and I want to make the last across column pink. If I knew the column number of the final summary column, I could find the column number of the last across column by subtracting 1. &lt;BR /&gt;&lt;BR /&gt;I have occasionally had reason to run a PROC SUMMARY on data, and then PROC REPORT on the summary output. It surprised me that sometimes with large data sets the SUMMARY+REPORT approach was noticeably faster than creating the same final report using PROC REPORT alone. I would have thought the run times would be very similar because the same calculation engine is used in both. &lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13901"&gt;@JackHamilton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Better to put this in its own thread, rather than here in an unrelated (and solved) thread.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 22:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779452#M25457</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-09T22:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779494#M25459</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; I don't understand why you think it's an unrelated question.  The original question was about determining the values possible for a column reference in CALL DEFINE, and my question is also about that.  And the answer to my question might provide an alternative answer to the problem behind the original question.</description>
      <pubDate>Wed, 10 Nov 2021 03:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779494#M25459</guid>
      <dc:creator>JackHamilton</dc:creator>
      <dc:date>2021-11-10T03:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779504#M25460</link>
      <description>&lt;P&gt;Your question&amp;nbsp;&lt;EM&gt;is&lt;/EM&gt; unrelated, but more important, my question has been solved and marked as such, so any additional post won't get much attention.&lt;/P&gt;
&lt;P&gt;Therefore it's better for you to post your question in a new topic.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 05:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779504#M25460</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-10T05:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why does CALL DEFINE not accept the column name?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779537#M25461</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13901"&gt;@JackHamilton&lt;/a&gt; I'm not going to debate it with you. You should see this at the top of the thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-11-10 06_09_10-Window.png" style="width: 457px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65557i040214BB764A295D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-11-10 06_09_10-Window.png" alt="2021-11-10 06_09_10-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So help yourself, and help the Community — start a new thread.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 11:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Why-does-CALL-DEFINE-not-accept-the-column-name/m-p/779537#M25461</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-10T11:10:29Z</dc:date>
    </item>
  </channel>
</rss>

