<?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 and numeric arrays in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33463#M8110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the difference any more than that the one call included the nowd option while the other didn't?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Oct 2011 13:11:06 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-10-24T13:11:06Z</dc:date>
    <item>
      <title>Proc REPORT and numeric arrays</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33462#M8109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone have an idea why line 913 below produces an array with 6 elements, each dotted variable is doubled.&amp;nbsp; While using variable name constants in line 920 produces the expect 3 elements.&amp;nbsp; Maybe I should check the UG. :smileyblush:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;909 proc report data=sashelp.class nowd list;&lt;/P&gt;&lt;P&gt;910 columns _numeric_;&lt;/P&gt;&lt;P&gt;911&lt;/P&gt;&lt;P&gt;912 compute before;&lt;/P&gt;&lt;P&gt;913 array _nb&lt;LI&gt; age.sum height.sum weight.sum;&lt;/LI&gt;&lt;/P&gt;&lt;P&gt;914 rcn = seenum(dim(_nb),'DIM=');&lt;/P&gt;&lt;P&gt;915 do i = 1 to dim(_nb);&lt;/P&gt;&lt;P&gt;916 rcn = seenum(_nb&lt;I&gt;,cats(catx('_',vname(_nb&lt;I&gt;),i),'='));&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;917 end;&lt;/P&gt;&lt;P&gt;918 endcomp;&lt;/P&gt;&lt;P&gt;919 compute after;&lt;/P&gt;&lt;P&gt;920 array _na&lt;LI&gt; 'age.sum'n 'height.sum'n 'weight.sum'n;&lt;/LI&gt;&lt;/P&gt;&lt;P&gt;921 rcn = seenum(dim(_na),'DIM=');&lt;/P&gt;&lt;P&gt;922 do i = 1 to dim(_na);&lt;/P&gt;&lt;P&gt;923 rcn = seenum(_na&lt;I&gt;,cats(catx('_',vname(_na&lt;I&gt;),i),'='));&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;924 end;&lt;/P&gt;&lt;P&gt;925 endcomp;&lt;/P&gt;&lt;P&gt;926&lt;/P&gt;&lt;P&gt;927 run;&lt;/P&gt;&lt;P&gt;PROC REPORT DATA=SASHELP.CLASS LS=123 PS=63 SPLIT="/" CENTER ;&lt;/P&gt;&lt;P&gt;COLUMN ( Age Height Weight );&lt;/P&gt;&lt;P&gt;DEFINE Age / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Age" ;&lt;/P&gt;&lt;P&gt;DEFINE Height / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Height" ;&lt;/P&gt;&lt;P&gt;DEFINE Weight / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Weight" ;&lt;/P&gt;&lt;P&gt;RBREAK BEFORE / ;&lt;/P&gt;&lt;P&gt;RBREAK AFTER / ;&lt;/P&gt;&lt;P&gt;COMPUTE BEFORE ;&lt;/P&gt;&lt;P&gt;array _nb [ * ] age.sum height.sum weight.sum;&lt;/P&gt;&lt;P&gt;rcn = seenum(dim(_nb), 'DIM=');&lt;/P&gt;&lt;P&gt;do i = 1 to dim(_nb);&lt;/P&gt;&lt;P&gt;rcn = seenum(_nb [ i ], cats(catx('_', vname(_nb [ i ]), i), '='));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;ENDCOMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPUTE AFTER ;&lt;/P&gt;&lt;P&gt;array _na [ * ] 'age.sum'n 'height.sum'n 'weight.sum'n;&lt;/P&gt;&lt;P&gt;rcn = seenum(dim(_na), 'DIM=');&lt;/P&gt;&lt;P&gt;do i = 1 to dim(_na);&lt;/P&gt;&lt;P&gt;rcn = seenum(_na [ i ], cats(catx('_', vname(_na [ i ]), i), '='));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;ENDCOMP;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;DIM= 6&lt;/P&gt;&lt;P&gt;Age.SUM_1= 253&lt;/P&gt;&lt;P&gt;Age.SUM_2= 253&lt;/P&gt;&lt;P&gt;Height.SUM_3= 1184.4&lt;/P&gt;&lt;P&gt;Height.SUM_4= 1184.4&lt;/P&gt;&lt;P&gt;Weight.SUM_5= 1900.5&lt;/P&gt;&lt;P&gt;Weight.SUM_6= 1900.5&lt;/P&gt;&lt;P&gt;DIM= 3&lt;/P&gt;&lt;P&gt;Age.SUM_1= 253&lt;/P&gt;&lt;P&gt;Height.SUM_2= 1184.4&lt;/P&gt;&lt;P&gt;Weight.SUM_3= 1900.5&lt;/P&gt;&lt;P&gt;NOTE: There were 19 observations read from the data set SASHELP.CLASS.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.04 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 12:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33462#M8109</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-10-24T12:45:17Z</dc:date>
    </item>
    <item>
      <title>Proc REPORT and numeric arrays</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33463#M8110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the difference any more than that the one call included the nowd option while the other didn't?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 13:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33463#M8110</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-24T13:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Proc REPORT and numeric arrays</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33464#M8111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is only one PROC REPORT numbered lines 909-927 The unnumbered lines are result of LIST option and output from SEENUM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 14:02:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33464#M8111</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-10-24T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Proc REPORT and numeric arrays</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33465#M8112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't find anything in the documentation that says that compound names have to be referred to with name literals.&amp;nbsp; I would think this one should be sent to tech support and will result in a hotfix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2011 15:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33465#M8112</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-24T15:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc REPORT and numeric arrays</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33466#M8113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Null. &lt;/P&gt;&lt;P&gt;Because age.sum maps two variable (age and 'age.sum'n) which age is for computed usage,'age.sum'n is for&lt;/P&gt;&lt;P&gt;computed before/after usage. So you will get six variables ,while another statement is three varibales.&lt;/P&gt;&lt;P&gt;So if you want get three variables before computed block, then use another three temp variables to hold these value of three variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC REPORT DATA=SASHELP.CLASS LS=123 PS=63 SPLIT="/" CENTER&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;COLUMN ( Age Height Weight );&lt;/P&gt;&lt;P&gt;DEFINE Age / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Age" ;&lt;/P&gt;&lt;P&gt;DEFINE Height / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Height" ;&lt;/P&gt;&lt;P&gt;DEFINE Weight / SUM FORMAT= BEST9. WIDTH=9 SPACING=2 RIGHT "Weight" ;&lt;/P&gt;&lt;P&gt;RBREAK BEFORE / ;&lt;/P&gt;&lt;P&gt;RBREAK AFTER / ;&lt;/P&gt;&lt;P&gt;COMPUTE BEFORE ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;_age=age.sum; _height=height.sum; _weight=weight.sum;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;array _nb [ * ] &lt;STRONG&gt;_age _height _weight&lt;/STRONG&gt;; &lt;/P&gt;&lt;P&gt;rcn = seenum(dim(_nb), 'DIM=');&lt;/P&gt;&lt;P&gt;do i = 1 to dim(_nb);&lt;/P&gt;&lt;P&gt;rcn = seenum(_nb [ i ], cats(catx('_', vname(_nb [ i ]), i), '='));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;ENDCOMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPUTE AFTER ;&lt;/P&gt;&lt;P&gt;array _na [ * ] 'age.sum'n 'height.sum'n 'weight.sum'n;&lt;/P&gt;&lt;P&gt;rcn = seenum(dim(_na), 'DIM=');&lt;/P&gt;&lt;P&gt;do i = 1 to dim(_na);&lt;/P&gt;&lt;P&gt;rcn = seenum(_na [ i ], cats(catx('_', vname(_na [ i ]), i), '='));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;ENDCOMP;&lt;/P&gt;&lt;P&gt;RUN;&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;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 02:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-REPORT-and-numeric-arrays/m-p/33466#M8113</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-10-25T02:38:24Z</dc:date>
    </item>
  </channel>
</rss>

