<?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: Line cutting off despite adequate len value in Proc Report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747925#M234826</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Compute before a;
length Text $50;
if Line = 1 then text = "This Car is Asian";
else if Line = 2 then Text = "This Car is European ";
else If Line = 3 then Text = "I Love this car but I cannot afford it"; else text = "If Oprah was here, each of us would get one";
Line @1 Text $50.;
endcomp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you try this? But I guess put $ 55 if that's how long you have in your OP.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 19:13:25 GMT</pubDate>
    <dc:creator>tarheel13</dc:creator>
    <dc:date>2021-06-14T19:13:25Z</dc:date>
    <item>
      <title>Line cutting off despite adequate len value in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747891#M234818</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a report via proc report and have lines being used as separators at specific rows, however the text is being cut off after 36 characters for some reason and I'm not sure why. Report code is below, if anyone can give me some insight as to why this is happening please let me know! The text being cut off is in the last "compute before" block.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data = test_table headline;
title 'Return of Results for SVA0901023';
columns NAME Rater_N Rater_Mean Rater_STD Rater_MIN Rater_MAX Rater_range Scholar_MEAN Difference ROW;
define NAME / display 'Name' width = 10 format = $teamscience.;
define Rater_N / display 'Rater N' width = 2;
define Rater_Mean / analysis 'Rater Mean' format=8.1;
define Rater_STD / analysis 'Std Dev' format=8.1;
define Rater_MIN / analysis 'Rater Min' format = 8.1 noprint;
define Rater_MAX / analysis 'Rater Max' format = 8.1 noprint;
define Rater_range / computed 'Rater Range' format=8.1;
define Scholar_MEAN / analysis 'Scholar Rating' width = 10;
define Difference / computed 'Difference' format=8.1;
define row / order noprint ;
compute Rater_range;
	Rater_range = sum(Rater_MIN.sum,-1*Rater_MAX.sum);
endcomp;
compute Difference;
	Difference = sum(Rater_MEAN.sum,-1*Scholar_MEAN.sum);
	if Rater_MEAN.sum = . or Scholar_MEAN.sum = . then Difference = .;
endcomp;
compute before ROW / style={just=left fontweight=bold fontsize=3} ;
  len=55;
       if row=1 then text='Foundational leadership competencies';
  else if row=10 then text='Professionalism';
  else if row=15 then text='Team Building and Team Sustainability';
  else if row=27 then text='Appropriate Use of Resources and Execution of Study';
  else len=0;
  line text $varying. len;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jun 2021 17:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747891#M234818</guid>
      <dc:creator>mitrakos</dc:creator>
      <dc:date>2021-06-14T17:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Line cutting off despite adequate len value in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747899#M234820</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;can you help?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 18:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747899#M234820</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-06-14T18:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Line cutting off despite adequate len value in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747925#M234826</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Compute before a;
length Text $50;
if Line = 1 then text = "This Car is Asian";
else if Line = 2 then Text = "This Car is European ";
else If Line = 3 then Text = "I Love this car but I cannot afford it"; else text = "If Oprah was here, each of us would get one";
Line @1 Text $50.;
endcomp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you try this? But I guess put $ 55 if that's how long you have in your OP.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 19:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747925#M234826</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2021-06-14T19:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Line cutting off despite adequate len value in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747926#M234827</link>
      <description>&lt;P&gt;If you look, or count, very closely you will note that the very first value you use for TEXT= of&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;Foundational leadership competencies&lt;/LI-CODE&gt;
&lt;P&gt;is exactly 36 characters long.&lt;/P&gt;
&lt;P&gt;So that has set the length of the variable "text".&lt;/P&gt;
&lt;P&gt;I suspect that if you use:&lt;/P&gt;
&lt;PRE&gt;      if row=27 then text='Appropriate Use of Resources and Execution of Study';
  else if row=1 then text='Foundational leadership competencies';
  else if row=10 then text='Professionalism';
  else if row=15 then text='Team Building and Team Sustainability';
  else len=0;&lt;/PRE&gt;
&lt;P&gt;where the longest value appears first the issue goes away.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the same behavior that a data step has for new variables where an explicit length statement does not provide a length before use.&lt;/P&gt;
&lt;P&gt;Or try &lt;/P&gt;
&lt;P&gt;Length text $ 60; before the if/then/else block.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 19:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747926#M234827</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-14T19:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Line cutting off despite adequate len value in Proc Report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747930#M234829</link>
      <description>Really great observation! I was able to trick SAS by putting a bunch of spaces at the end of the first text line to increase the amount of characters. Thank you!</description>
      <pubDate>Mon, 14 Jun 2021 19:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Line-cutting-off-despite-adequate-len-value-in-Proc-Report/m-p/747930#M234829</guid>
      <dc:creator>mitrakos</dc:creator>
      <dc:date>2021-06-14T19:21:36Z</dc:date>
    </item>
  </channel>
</rss>

