<?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 - computed variable: longer name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/832077#M328871</link>
    <description>&lt;P&gt;Thank you for your two options. Both are good!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 05:51:50 GMT</pubDate>
    <dc:creator>Konkordanz</dc:creator>
    <dc:date>2022-09-07T05:51:50Z</dc:date>
    <item>
      <title>proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831894#M328795</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;within my proc-report-syntax I want to rename the Rbreak-Line into "This is a test". But the result is short: "This i". So: How can I increase the length?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars completerows ;
columns origin make type,(msrp invoice) Differenz;
define origin/group style(column)=[cellwidth=10cm]  style(header)=[background=yellow] ;
define make/ group ;
define type/across;
define msrp/"Mittelwert" mean;
define invoice/"Summe v. Invoice" sum;
define Differenz/computed;
Break after Origin/ summarize style={font_weight=bold};
RBreak after /Summarize;
compute Differenz;
	Differenz= _c3_ - _c4_ ;
endcomp;
compute after origin; 
	if not missing(_break_) then origin= "Gesamt";
endcomp;
&lt;STRONG&gt;compute after;
	if not missing(_break_) then Origin="This is a test";
endcomp;&lt;/STRONG&gt;
where origin in("Asia", "Europe");
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:41:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831894#M328795</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2022-09-06T09:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831902#M328803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/388612"&gt;@Konkordanz&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Origin&lt;/FONT&gt; is a character variable of length 6 in &lt;FONT face="courier new,courier"&gt;sashelp.cars&lt;/FONT&gt;, so you will need to increase its length in a preliminary step before you can assign longer values to it:&lt;/P&gt;
&lt;PRE&gt;data cars;
length Origin $14;
set sashelp.cars;
run;

proc report data=&lt;STRONG&gt;cars&lt;/STRONG&gt; ...;
...&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2022 11:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831902#M328803</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-09-06T11:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831913#M328811</link>
      <description>&lt;P&gt;Or make a COMPUTED vairable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc report data=sashelp.cars completerows nowd;
columns origin _origin make type,(msrp invoice) Differenz;
define origin/group style(column)=[cellwidth=10cm]  style(header)=[background=yellow] noprint ;
define _origin/computed style(column)=[cellwidth=10cm]  style(header)=[background=yellow] ;

define make/ group ;
define type/across;
define msrp/"Mittelwert" mean;
define invoice/"Summe v. Invoice" sum;
define Differenz/computed;
Break after Origin/ summarize style={font_weight=bold};
RBreak after /Summarize;
compute Differenz;
	Differenz= _c4_ - _c5_ ;
endcomp;

compute _origin/character length=80;
_origin=origin;
endcomp;

compute after origin; 
	if not missing(_break_) then _origin= "Gesamt";
endcomp;
compute after;
	if not missing(_break_) then _Origin="This is a test";
endcomp;
where origin in("Asia", "Europe");
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Sep 2022 13:20:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831913#M328811</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-06T13:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831928#M328817</link>
      <description>&lt;P&gt;The insertion of &lt;FONT face="courier new,courier"&gt;_origin&lt;/FONT&gt; before &lt;FONT face="courier new,courier"&gt;msrp&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;invoice&lt;/FONT&gt; in the COLUMN statement changes the column numbers in the formula for &lt;FONT face="courier new,courier"&gt;Differenz&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Differenz= _c&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/FONT&gt;_ - _c&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/FONT&gt;_ ;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 13:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831928#M328817</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-09-06T13:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831931#M328819</link>
      <description>You are right. Already fixed it.</description>
      <pubDate>Tue, 06 Sep 2022 13:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/831931#M328819</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-09-06T13:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc report - computed variable: longer name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/832077#M328871</link>
      <description>&lt;P&gt;Thank you for your two options. Both are good!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 05:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-computed-variable-longer-name/m-p/832077#M328871</guid>
      <dc:creator>Konkordanz</dc:creator>
      <dc:date>2022-09-07T05:51:50Z</dc:date>
    </item>
  </channel>
</rss>

