<?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: ODS graphics on - with PROC GLM causing error in the log - &amp;quot;ERROR 180-322:&amp;quot; in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/874015#M26288</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;Thank you for your reply! Yes, apparently that was the issue. I've removed every single blanks around proc glm and it cleared the log from error.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 22:11:54 GMT</pubDate>
    <dc:creator>A_Kh</dc:creator>
    <dc:date>2023-05-04T22:11:54Z</dc:date>
    <item>
      <title>ODS graphics on - with PROC GLM causing error in the log - "ERROR 180-322:"</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/873911#M26286</link>
      <description>&lt;P&gt;Dear Experts,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've 2 datasets for regression testing (against each other).&amp;nbsp;It's a very rare (almost never happens) that there is a discrepancy between two datasets. So, i'm providing a portion of data that would be identical for both datasets.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The code produces a PDF report from PROC GLM and PROC PRINT outputs. When running it without PROC GLM, there is no issue. But with PROC GLM I'm getting an error message&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="ui-provider hb b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;"ERROR 180-322: Statement is not valid or it is used out of proper order."&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;in the log. Looking at the log, I would say the error is caused by ODS GRAPHICS ON /PROC GLM statement.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've read previous posts ( &lt;A title="example" href="https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/td-p/203999" target="_self"&gt;example&lt;/A&gt;&amp;nbsp;) regarding this error message and investigated my codes, but no success. May be somebody did have a similar experience as me and could help to figure out the issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Below is data portion, my code and log screens.&amp;nbsp;&lt;BR /&gt;Thank you!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have_old;
input P Est SE Grad;
cards;
 1       -3.27        0.46        0.00
 2       -3.46        0.49        0.00
 3       -5.60        1.44        0.00
 4       -1.25        0.15        0.00
 5       -0.83        0.14        0.00
 6       -4.68        0.75        0.00
 7       -3.56        0.44        0.00
 8       -0.22        0.22        0.00
 9       -1.51        0.33        0.00
10       -3.50        0.38        0.00
11       -2.67        0.25        0.00
12       -1.93        0.33        0.00
13       -4.14        0.53        0.00
14       -3.04        0.55        0.00
15       -3.41        0.43        0.00
16       -2.19        0.34        0.00
17       -3.08        0.32        0.00
18       -1.95        0.19        0.00
19       -3.76        0.40        0.00
20       -4.31        0.71        0.00
;
run; 

data have_new;
	set have_old;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro compare; 
	ods noproctitle;
	ods pdf file= "C:\Users\myfolder\Desktop\test\output\DOC1.pdf";
		%do i= 1 %to 1;
			data newversion;
				set n&amp;amp;i._%fixname(%scan(&amp;amp;&amp;amp;newversionfile&amp;amp;i, 1, -)) (keep= p est);
			run; 
			data oldversion;
				set o&amp;amp;i._%fixname(%scan(&amp;amp;&amp;amp;oldversionfile&amp;amp;i, 1, -)) (keep= p est);
			run; 
			data combined;
				merge newversion(rename=(est= Version_%fixname(&amp;amp;newversion))) oldversion(rename=(est= Version_%fixname(&amp;amp;oldversion)));
				by p;
				if Version_%fixname(&amp;amp;newversion) ne Version_%fixname(&amp;amp;oldversion) then Warnings= "Check this row for discrepancies";
			run;&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE class=" language-sas"&gt;			ods graphics on;&amp;nbsp;
			ods exclude all;
			ods select FitStatistics FitPlot;
			PROC GLM data=combined plots= all;
				model Version_%fixname(&amp;amp;newversion) = Version_%fixname(&amp;amp;oldversion);
				title "Regression Testing of &amp;amp;NewVersion and &amp;amp;OldVersion EST values: %upcase(&amp;amp;&amp;amp;newversionfile&amp;amp;i)";
				footnote j=l font=arial h=8pt "Source:&amp;amp;&amp;amp;newversionpath&amp;amp;i\&amp;amp;&amp;amp;newversionfile&amp;amp;i and &amp;amp;&amp;amp;oldversionpath&amp;amp;i\&amp;amp;&amp;amp;oldversionfile&amp;amp;i"; 	
			run;
			quit; 
			ods graphics off;

			title "Discrepancies between &amp;amp;NewVersion and &amp;amp;OldVersion EST values: %upcase(&amp;amp;&amp;amp;newversionfile&amp;amp;i)";
			footnote j=l font=arial h=8pt "Source:&amp;amp;&amp;amp;newversionpath&amp;amp;i\&amp;amp;&amp;amp;newversionfile&amp;amp;i and &amp;amp;&amp;amp;oldversionpath&amp;amp;i\&amp;amp;&amp;amp;oldversionfile&amp;amp;i"; 	
			proc print data=combined noobs;
				where Warnings ne ""; 
			run;
			title;footnote;
		%end; 
	ods pdf close;
	ods html;
	ods proctitle;
%mend;

%compare; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Log without PROC GLM (only proc print, where subsetting statement excluded for testing)&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="without error.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83610i0BC55C0398DEB048/image-size/large?v=v2&amp;amp;px=999" role="button" title="without error.PNG" alt="without error.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Log with PROC GLM&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="with error.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83611iE6FFCFF7ED9A2834/image-size/large?v=v2&amp;amp;px=999" role="button" title="with error.PNG" alt="with error.PNG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 16:37:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/873911#M26286</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-05-04T16:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: ODS graphics on - with PROC GLM causing error in the log - "ERROR 180-322:"</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/873936#M26287</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/321371"&gt;@A_Kh&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An invalid non-printable character, e.g. &lt;FONT face="courier new,courier"&gt;'A0'x&lt;/FONT&gt; (non-breaking space), after "&lt;FONT face="courier new,courier"&gt;ods graphics on;&lt;/FONT&gt;" can cause exactly this error message. So, deleting all whitespace characters between "&lt;FONT face="courier new,courier"&gt;ods graphics on;&lt;/FONT&gt;" and "&lt;FONT face="courier new,courier"&gt;ods exclude all;&lt;/FONT&gt;" and replacing them with ordinary blanks might resolve the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 17:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/873936#M26287</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-05-04T17:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: ODS graphics on - with PROC GLM causing error in the log - "ERROR 180-322:"</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/874015#M26288</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;Thank you for your reply! Yes, apparently that was the issue. I've removed every single blanks around proc glm and it cleared the log from error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 22:11:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-graphics-on-with-PROC-GLM-causing-error-in-the-log-quot/m-p/874015#M26288</guid>
      <dc:creator>A_Kh</dc:creator>
      <dc:date>2023-05-04T22:11:54Z</dc:date>
    </item>
  </channel>
</rss>

