<?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 Problem With Columns In Proc Report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-With-Columns-In-Proc-Report/m-p/9033#M2904</link>
    <description>%let Other_base300 = ;&lt;BR /&gt;
proc sql noprint; &lt;BR /&gt;
 select Distinct ent_name into: Other_base300 separated by ' '&lt;BR /&gt;
 from base_table_shift &lt;BR /&gt;
  where upcase(facility)=upcase("&amp;amp;facility") and upcase(ToolArea) not in ('WMCE','OVEN','LITHO','ISE');&lt;BR /&gt;
quit;&lt;BR /&gt;
%put Other Tools: &amp;amp;Other_base300;&lt;BR /&gt;
&lt;BR /&gt;
proc report data = spc_final nowd split='#';&lt;BR /&gt;
 columns  Month User UserArea ExPmProcedures &lt;BR /&gt;
  ('- ISE -'   &amp;amp;ISE_base300)&lt;BR /&gt;
  ('- LITHO -' &amp;amp;Litho_base300)&lt;BR /&gt;
 ( '- OVEN -'  &amp;amp;Oven_base300)&lt;BR /&gt;
  %IF "&amp;amp;Wmce_base300" NE "" %THEN ('- WMCE -' &amp;amp;Wmce_base300);&lt;BR /&gt;
  %IF "&amp;amp;Other_base300" NE "" %THEN ('- OTHER-' &amp;amp;Other_base300);&lt;BR /&gt;
  ;&lt;BR /&gt;
 label &amp;amp;label_base;&lt;BR /&gt;
 define month /order=data group 'M#o#n#t#h' ;&lt;BR /&gt;
 define User/ order=data Group 'U#s#e#r' ;&lt;BR /&gt;
 define UserArea / /*format=$User2UArea.*/ Order=data 'U#s#e#r#-#A#r#e#a';&lt;BR /&gt;
 define ExPmProcedures/ analysis sum  'E#x#-#P#m#P#r#o#c';&lt;BR /&gt;
 break after Month / summarize ul;&lt;BR /&gt;
 where upcase(facility)=upcase("&amp;amp;facility");&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Line generated by the macro variable "OTHER_BASE300".&lt;BR /&gt;
28390   300MM_DICER MAGNUM RAIDER_2 RECUP SCRUBBER&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 ---&lt;BR /&gt;
        22&lt;BR /&gt;
           --------&lt;BR /&gt;
           202&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, _ALL_,&lt;BR /&gt;
              _CHARACTER_, _CHAR_, _NUMERIC_.&lt;BR /&gt;
&lt;BR /&gt;
ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;BR /&gt;
&lt;BR /&gt;
It has to domething with the tool starting with a number 300MDICER. Any help?</description>
    <pubDate>Wed, 08 Jun 2011 08:26:04 GMT</pubDate>
    <dc:creator>Filipvdr</dc:creator>
    <dc:date>2011-06-08T08:26:04Z</dc:date>
    <item>
      <title>Problem With Columns In Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-With-Columns-In-Proc-Report/m-p/9033#M2904</link>
      <description>%let Other_base300 = ;&lt;BR /&gt;
proc sql noprint; &lt;BR /&gt;
 select Distinct ent_name into: Other_base300 separated by ' '&lt;BR /&gt;
 from base_table_shift &lt;BR /&gt;
  where upcase(facility)=upcase("&amp;amp;facility") and upcase(ToolArea) not in ('WMCE','OVEN','LITHO','ISE');&lt;BR /&gt;
quit;&lt;BR /&gt;
%put Other Tools: &amp;amp;Other_base300;&lt;BR /&gt;
&lt;BR /&gt;
proc report data = spc_final nowd split='#';&lt;BR /&gt;
 columns  Month User UserArea ExPmProcedures &lt;BR /&gt;
  ('- ISE -'   &amp;amp;ISE_base300)&lt;BR /&gt;
  ('- LITHO -' &amp;amp;Litho_base300)&lt;BR /&gt;
 ( '- OVEN -'  &amp;amp;Oven_base300)&lt;BR /&gt;
  %IF "&amp;amp;Wmce_base300" NE "" %THEN ('- WMCE -' &amp;amp;Wmce_base300);&lt;BR /&gt;
  %IF "&amp;amp;Other_base300" NE "" %THEN ('- OTHER-' &amp;amp;Other_base300);&lt;BR /&gt;
  ;&lt;BR /&gt;
 label &amp;amp;label_base;&lt;BR /&gt;
 define month /order=data group 'M#o#n#t#h' ;&lt;BR /&gt;
 define User/ order=data Group 'U#s#e#r' ;&lt;BR /&gt;
 define UserArea / /*format=$User2UArea.*/ Order=data 'U#s#e#r#-#A#r#e#a';&lt;BR /&gt;
 define ExPmProcedures/ analysis sum  'E#x#-#P#m#P#r#o#c';&lt;BR /&gt;
 break after Month / summarize ul;&lt;BR /&gt;
 where upcase(facility)=upcase("&amp;amp;facility");&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: Line generated by the macro variable "OTHER_BASE300".&lt;BR /&gt;
28390   300MM_DICER MAGNUM RAIDER_2 RECUP SCRUBBER&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 ---&lt;BR /&gt;
        22&lt;BR /&gt;
           --------&lt;BR /&gt;
           202&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, _ALL_,&lt;BR /&gt;
              _CHARACTER_, _CHAR_, _NUMERIC_.&lt;BR /&gt;
&lt;BR /&gt;
ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;BR /&gt;
&lt;BR /&gt;
It has to domething with the tool starting with a number 300MDICER. Any help?</description>
      <pubDate>Wed, 08 Jun 2011 08:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-With-Columns-In-Proc-Report/m-p/9033#M2904</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2011-06-08T08:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem With Columns In Proc Report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-With-Columns-In-Proc-Report/m-p/9034#M2905</link>
      <description>Hi:&lt;BR /&gt;
  Without seeing your entire log, I'd say offhand that it is NOT a problem with PROC REPORT. You are using &amp;amp;OTHER_BASE300 in a COLUMN statement. The items that are in a column statement are either your spanning headers (in quotes) -- variable names, computed item names or keyword statistics, such as N or PCTN.&lt;BR /&gt;
 &lt;BR /&gt;
  Variable names and computed item names must conform to SAS naming rules. Unless you are using named literals, a SAS variable name can only start with a letter or an underscore -- a SAS variable name CANNOT start with a number. &lt;BR /&gt;
&lt;BR /&gt;
  When your macro varaible &amp;amp;OTHER_BASE300 resolves, the NOTE shows you what it resolves to:&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: Line generated by the macro variable "OTHER_BASE300".&lt;BR /&gt;
28390 &lt;U&gt;300MM_DICER&lt;/U&gt; MAGNUM RAIDER_2 RECUP SCRUBBER&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
300MM_DICER is not a valid SAS variable name to be listed in a COLUMN statement. If this is the correct variable name, then you will have to construct it as a named literal (which is generally something like 'Age Hired'n -- a quoted string followed immediately by an &lt;B&gt;n&lt;/B&gt;).&lt;BR /&gt;
&lt;BR /&gt;
The issue is not with PROC REPORT. You would encounter this issue in any code where you used &amp;amp;OTHER_BASE300 for variable names. The ERROR you got in the log:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, _ALL_,&lt;BR /&gt;
_CHARACTER_, _CHAR_, _NUMERIC_.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                         &lt;BR /&gt;
...tells you exactly what it's expecting a name, a quoted string (such as with a named literal reference), or one of the special methods for referencing variables.&lt;BR /&gt;
  &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 08 Jun 2011 14:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Problem-With-Columns-In-Proc-Report/m-p/9034#M2905</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-06-08T14:48:42Z</dc:date>
    </item>
  </channel>
</rss>

