<?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 error - expecting ;  but no obvious error that I can see in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890593#M26368</link>
    <description>&lt;P&gt;Getting&amp;nbsp; error in the log: "Expecting ;.&amp;nbsp; The symbol is not recognized and will be ignored". If I comment out compute discharge date section in the compute block, the error does not show. I am attempting to traffic light so if there is a hospital admission date, then we should also have a discharge date. Similarly, if we have a discharge date, we should have an admission date.&amp;nbsp; I don't see where I'm missing a semi-colon. I have seen SAS throw errors that are not applicable before though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error when running this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Cohortb1_2022Q3Q4;
columns 
record_number
admission_date
discharge_date;

define admission_date				  / Display 'Admission Date To Diagnostic Facility';
define discharge_date				  / Display 'Discharge Date From Diagnostic Facility';
define record_number                  / 'Record Number'; 

compute admission_date;
  if admission_date = . and discharge_date ne .
  then call define(_col_,'style','style={background=red})');
endcomp;

compute discharge_date;
  if admission_date ne . and discharge_date = .
  then call define(_col_,'style','style={background=red})');
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No error when commenting out compute discharge date section:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Cohortb1_2022Q3Q4;
columns 
record_number
admission_date
discharge_date;

define admission_date				  / Display 'Admission Date To Diagnostic Facility';
define discharge_date				  / Display 'Discharge Date From Diagnostic Facility';
define record_number                  / 'Record Number'; 

compute admission_date;
  if admission_date = . and discharge_date ne .
  then call define(_col_,'style','style={background=red})');
endcomp;

/*compute discharge_date;*/
/*  if admission_date ne . and discharge_date = .*/
/*  then call define(_col_,'style','style={background=red})');*/
/*endcomp;*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 17:20:04 GMT</pubDate>
    <dc:creator>vegan_renegade</dc:creator>
    <dc:date>2023-08-23T17:20:04Z</dc:date>
    <item>
      <title>proc report error - expecting ;  but no obvious error that I can see</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890593#M26368</link>
      <description>&lt;P&gt;Getting&amp;nbsp; error in the log: "Expecting ;.&amp;nbsp; The symbol is not recognized and will be ignored". If I comment out compute discharge date section in the compute block, the error does not show. I am attempting to traffic light so if there is a hospital admission date, then we should also have a discharge date. Similarly, if we have a discharge date, we should have an admission date.&amp;nbsp; I don't see where I'm missing a semi-colon. I have seen SAS throw errors that are not applicable before though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error when running this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Cohortb1_2022Q3Q4;
columns 
record_number
admission_date
discharge_date;

define admission_date				  / Display 'Admission Date To Diagnostic Facility';
define discharge_date				  / Display 'Discharge Date From Diagnostic Facility';
define record_number                  / 'Record Number'; 

compute admission_date;
  if admission_date = . and discharge_date ne .
  then call define(_col_,'style','style={background=red})');
endcomp;

compute discharge_date;
  if admission_date ne . and discharge_date = .
  then call define(_col_,'style','style={background=red})');
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No error when commenting out compute discharge date section:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=Cohortb1_2022Q3Q4;
columns 
record_number
admission_date
discharge_date;

define admission_date				  / Display 'Admission Date To Diagnostic Facility';
define discharge_date				  / Display 'Discharge Date From Diagnostic Facility';
define record_number                  / 'Record Number'; 

compute admission_date;
  if admission_date = . and discharge_date ne .
  then call define(_col_,'style','style={background=red})');
endcomp;

/*compute discharge_date;*/
/*  if admission_date ne . and discharge_date = .*/
/*  then call define(_col_,'style','style={background=red})');*/
/*endcomp;*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 17:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890593#M26368</guid>
      <dc:creator>vegan_renegade</dc:creator>
      <dc:date>2023-08-23T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc report error - expecting ;  but no obvious error that I can see</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890594#M26369</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Getting&amp;nbsp; error in the log: "Expecting ;.&amp;nbsp; The symbol is not recognized and will be ignored".&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show us the log. Show us every single line in the log for this PROC. Do this every time you get an error in the log. Showing us just the error messages is usually not enough. Copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Although if I had to guess, you have code where there is one left parenthesis and two right parentheses. That seems like it would cause an error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 17:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890594#M26369</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-23T17:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc report error - expecting ;  but no obvious error that I can see</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890614#M26370</link>
      <description>&lt;P&gt;Not saying it is the cause of your error and definitely agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt; about including the entire log.&lt;/P&gt;
&lt;P&gt;You may want to look at both of the lines like this:&lt;/P&gt;
&lt;PRE&gt;  then call define(_col_,'style','style={background=red}&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;');&lt;/PRE&gt;
&lt;P&gt;Both of your conditional Call define statements have unbalanced parentheses which is seldom a good thing.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 18:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890614#M26370</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-08-23T18:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc report error - expecting ;  but no obvious error that I can see</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890647#M26371</link>
      <description>You're right, I did have a second right parenthesis on both compute variables, though error only showed on one variable.</description>
      <pubDate>Wed, 23 Aug 2023 19:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-error-expecting-but-no-obvious-error-that-I-can-see/m-p/890647#M26371</guid>
      <dc:creator>vegan_renegade</dc:creator>
      <dc:date>2023-08-23T19:25:10Z</dc:date>
    </item>
  </channel>
</rss>

