<?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: nocenter option causing LINESIZE issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973402#M377682</link>
    <description>&lt;P&gt;The ERROR message is specific to the Listing destination, so turning that destination off using either:&lt;/P&gt;
&lt;P&gt;ods listing close;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods _all_ close;&lt;/P&gt;
&lt;P&gt;before the ODS RTF statement is the most logical solution for eliminating the Error. Just commenting out NOCENTER does not necessarily mean that is it set to the default. I would like to see&lt;/P&gt;
&lt;P&gt;proc options option=center;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;before the ODS RTF statement to see what it is set to. If you have additional questions or problems, please send the log as an attachment so that we can see the complete code and messages you are getting.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2025 12:31:01 GMT</pubDate>
    <dc:creator>Kathryn_SAS</dc:creator>
    <dc:date>2025-08-27T12:31:01Z</dc:date>
    <item>
      <title>nocenter option causing LINESIZE issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973401#M377681</link>
      <description>&lt;P&gt;I have a macro that inserts pngs into an rtf file using PROC REPORT and rtf field code.&amp;nbsp; It is producing the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: At least one column width is wider than LINESIZE.&lt;/PRE&gt;&lt;P&gt;This error occurs even though I have verified that the rtf field code is not wide enough to cause this issue and the linesize is set to max.&amp;nbsp; I was able to track down the root cause as the OPTIONS NOCENTER included in our standard autoexec.&amp;nbsp; When this option is commented out, the macro runs without any problem (we have a bunch of different options specified, shown below, but the only one that eliminates the error is nocenter)&lt;/P&gt;&lt;PRE&gt;options ps=max              /* USE NUMBER NEAR 50  IF PRINTING .lst         */
        ls=max              /* USE NUMBER NEAR 120 IF PRINTING .lst         */
        nocenter            /* LEFT JUSTIFY ALL OUTPUT              */
        nonumber            /* DO NOT USE PAGE NUMBERS IN PROC OUTPUT       */
        nodate              /* DO NOT USE DATE     IN PROC OUTPUT       */
        compress=yes            /* COMPRESSES DATASET TO SAVE SPACE ON SERVER       */
        fmtsearch=( specform library  )/* SEARCH ORDER FOR FORMATS IN PROGRAMS          */
;&lt;/PRE&gt;&lt;P&gt;We do have a workaround--since the output is intended to go to an rtf, users put "ods listing close;" before calling the macro and then "ods listing;" afterward to restart sending output to the list.&amp;nbsp; However, it would be ideal not to have to do that.&amp;nbsp; Does anyone have an explanation as to why NOCENTER is causing the LINESIZE error to occur and/or if there's a way to stop that from happening?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 12:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973401#M377681</guid>
      <dc:creator>hartwell</dc:creator>
      <dc:date>2025-08-27T12:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: nocenter option causing LINESIZE issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973402#M377682</link>
      <description>&lt;P&gt;The ERROR message is specific to the Listing destination, so turning that destination off using either:&lt;/P&gt;
&lt;P&gt;ods listing close;&lt;/P&gt;
&lt;P&gt;or&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods _all_ close;&lt;/P&gt;
&lt;P&gt;before the ODS RTF statement is the most logical solution for eliminating the Error. Just commenting out NOCENTER does not necessarily mean that is it set to the default. I would like to see&lt;/P&gt;
&lt;P&gt;proc options option=center;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;before the ODS RTF statement to see what it is set to. If you have additional questions or problems, please send the log as an attachment so that we can see the complete code and messages you are getting.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 12:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973402#M377682</guid>
      <dc:creator>Kathryn_SAS</dc:creator>
      <dc:date>2025-08-27T12:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: nocenter option causing LINESIZE issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973414#M377683</link>
      <description>&lt;P&gt;If you want PROC REPORT not to complain when the column width is too long for the linesize then specify shorter column widths in the DEFINE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set sashelp.class(obs=3);
  length all $200;
  all=catx('|',of _all_);
run;

proc report data=test;
run;

proc report data=test;
  define all / width=20 flow ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;7    proc report data=test;
NOTE: Writing HTML Body file: sashtml.htm
8    run;

ERROR: The width of all is not between 1 and 78. Adjust the column width or
       line size.
NOTE: This affects LISTING output.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 3 observations read from the data set WORK.TEST.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.64 seconds
      cpu time            0.14 seconds


9    proc report data=test;
10     define all / width=20 flow ;
11   run;

NOTE: There were 3 observations read from the data set WORK.TEST.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Aug 2025 15:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973414#M377683</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-08-27T15:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: nocenter option causing LINESIZE issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973416#M377684</link>
      <description>&lt;P&gt;Since you are running a macro.&amp;nbsp; And a macro that already generates steps (PROC REPORT) you can add the commands to shut down listing to your macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could just close the listing and open it again.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;....
ods listing close;
proc report .....
ods listing ;
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But that would open the listing if it wasn't open before.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead why not use ODS SELECT instead and only generate the commands when the listing destination is active.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set sashelp.vdest;
  where destination='LISTING';
  call execute('ods listing select none;');
run;
proc report ....
...
data _null_;
  set sashelp.vdest;
  where destination='LISTING';
  call execute('ods listing select all;');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Aug 2025 15:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973416#M377684</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-08-27T15:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: nocenter option causing LINESIZE issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973424#M377685</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I was able to use this to arrive at my solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was very confusing because the linesize set for the listing is max (256), so everything inside the macro was limited to this (lots of length checks) and the test case I was using only had a length of about 100 characters.&amp;nbsp; Everything works perfectly fine when OPTIONS NOCENTER is not specified (everything prints to the lst without any problems) but I get the LINESIZE error when OPTIONS NOCENTER is specified.&amp;nbsp; Using the syntax you suggested, I started at width = 256 and still got the error, but once I got to width = 254, the error disappeared.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 17:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/nocenter-option-causing-LINESIZE-issue/m-p/973424#M377685</guid>
      <dc:creator>hartwell</dc:creator>
      <dc:date>2025-08-27T17:53:04Z</dc:date>
    </item>
  </channel>
</rss>

