<?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: proc tabulate and quoted string error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350418#M81447</link>
    <description>&lt;P&gt;that makes sense now that you point that out but when I remove them I still get the message just in another spot any idea&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;16   libname ROBM 'F:\robm';
NOTE: Libref ROBM was successfully assigned as follows:
      Engine:        V9
      Physical Name: F:\robm
17
18   OPTIONS VALIDVARNAME=ANY;
19
20
21
22
23
24     proc tabulate data=ROBM.TABBS99991 missing contents = ' ' format=COMMA6.0
24 ! S=[foreground=highlight.];
25      class 'ALLOCATED_COLLEGE'n 'SUBJECT_DESC'n 'TERM_CODE'n;
26      var INCLUDED_TUITION;
27      keylabel Sum = ' ';
28      table ('ALLOCATED_COLLEGE'n = ) *('SUBJECT_DESC'n=  all = 'Total') all='Total', (('TERM_CODE'n
                                      -
                                      22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a format name.

28 !    table ('ALLOCATED_COLLEGE'n = ) *('SUBJECT_DESC'n=  all = 'Total') all='Total', (('TERM_CODE'n
                                                                -
-
                                                                22
22
28 !  =  all = 'Total')*((N = Amount))) /
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.
29                     contents = ' ' misstext=' ' box={label = ALLOCATED_COLLEGE/SUBJECT_DESC};
                                                                                 -
                                                                                 22
                                                                                 200
ERROR 22-322: Syntax error, expecting one of the following: LABEL, STYLE, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
30     run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE TABULATE used (Total process time):
      real time           0.02 seconds
      cpu time            0.03 seconds


&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Apr 2017 01:15:06 GMT</pubDate>
    <dc:creator>robm</dc:creator>
    <dc:date>2017-04-17T01:15:06Z</dc:date>
    <item>
      <title>proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350412#M81444</link>
      <description>&lt;P&gt;I have the following code &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;libname ROBM "F:\robm";
OPTIONS VALIDVARNAME=ANY;
  proc tabulate data=ROBM.TABBS99991 missing contents = ' ' format=COMMA6.0 S=[foreground=highlight.];
   class 'ALLOCATED_COLLEGE'n 'SUBJECT_DESC'n 'TERM_CODE'n;
   var INCLUDED_TUITION;
   keylabel Sum = " ";
   table ('ALLOCATED_COLLEGE'n = ") *('SUBJECT_DESC'n= " all = 'Total') all='Total', (('TERM_CODE'n = " all = 'Total')*((N = Amount))) /
                  contents = ' ' misstext=' ' box={label = "ALLOCATED_COLLEGE/SUBJECT_DESC"};
  run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but when i run it I get the error complaning about quouted string I inserted spaces so I am not sure what the problem is any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;229  libname ROBM "F:\robm";
NOTE: Libref ROBM was successfully assigned as follows:
      Engine:        V9
      Physical Name: F:\robm
230
231  OPTIONS VALIDVARNAME=ANY;
232
233
234
235
236
237    proc tabulate data=ROBM.TABBS99991 missing contents = ' ' format=COMMA6.0
237! S=[foreground=highlight.];
238     class 'ALLOCATED_COLLEGE'n 'SUBJECT_DESC'n 'TERM_CODE'n;
239     var INCLUDED_TUITION;
240     keylabel Sum = " ";
241     table ('ALLOCATED_COLLEGE'n = ") *('SUBJECT_DESC'n= " all = 'Total') all='Total',
241! (('TERM_CODE'n = "
                      -
                      49
241!  all = 'Total')*((N = Amount))) /
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
              Inserting white space between a quoted string and the succeeding identifier is
             recommended.

242                    contents = ' ' misstext=' ' box={label = "ALLOCATED_COLLEGE/SUBJECT_DESC"};
243    run;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2017 00:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350412#M81444</guid>
      <dc:creator>robm</dc:creator>
      <dc:date>2017-04-17T00:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350414#M81445</link>
      <description>&lt;P&gt;You didn't provide any data so we can't test your code, but the individual double quotes in the following lines are likely your problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;241     table ('ALLOCATED_COLLEGE'n = ") *('SUBJECT_DESC'n= " all = 'Total') all='Total',
241! (('TERM_CODE'n = "
 &lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 01:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350414#M81445</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-17T01:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350417#M81446</link>
      <description>&lt;P&gt;It's not an ERROR, it's a WARNING and won't impact your results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a specific reason you're using named literal convention for variables when you don't have spaces in the names?&lt;/P&gt;
&lt;P&gt;Is the code you posted first with/without the 'spaces you added'?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This usually refers to cases where you have something like the following, a character other than n/d/dt after a quoted string. You can add a space after the quotation marks and that should resolve the issues. It's hard to see from the code where the issue is being identified, but I'd probably add spaces after all the quotation marks in turn until it disappeared.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'my string&lt;FONT color="#FF0000"&gt;&lt;U&gt;&lt;STRONG&gt;')&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 01:11:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350417#M81446</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-17T01:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350418#M81447</link>
      <description>&lt;P&gt;that makes sense now that you point that out but when I remove them I still get the message just in another spot any idea&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;16   libname ROBM 'F:\robm';
NOTE: Libref ROBM was successfully assigned as follows:
      Engine:        V9
      Physical Name: F:\robm
17
18   OPTIONS VALIDVARNAME=ANY;
19
20
21
22
23
24     proc tabulate data=ROBM.TABBS99991 missing contents = ' ' format=COMMA6.0
24 ! S=[foreground=highlight.];
25      class 'ALLOCATED_COLLEGE'n 'SUBJECT_DESC'n 'TERM_CODE'n;
26      var INCLUDED_TUITION;
27      keylabel Sum = ' ';
28      table ('ALLOCATED_COLLEGE'n = ) *('SUBJECT_DESC'n=  all = 'Total') all='Total', (('TERM_CODE'n
                                      -
                                      22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a format name.

28 !    table ('ALLOCATED_COLLEGE'n = ) *('SUBJECT_DESC'n=  all = 'Total') all='Total', (('TERM_CODE'n
                                                                -
-
                                                                22
22
28 !  =  all = 'Total')*((N = Amount))) /
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.
29                     contents = ' ' misstext=' ' box={label = ALLOCATED_COLLEGE/SUBJECT_DESC};
                                                                                 -
                                                                                 22
                                                                                 200
ERROR 22-322: Syntax error, expecting one of the following: LABEL, STYLE, }.
ERROR 200-322: The symbol is not recognized and will be ignored.
30     run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE TABULATE used (Total process time):
      real time           0.02 seconds
      cpu time            0.03 seconds


&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Apr 2017 01:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350418#M81447</guid>
      <dc:creator>robm</dc:creator>
      <dc:date>2017-04-17T01:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350421#M81449</link>
      <description>&lt;P&gt;I don't know what you want your table to look like, but the following modifications to your code produce a table without any errors or warnings:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc import datafile='/folders/myfolders/book1.xlsx'
   out=TABBS99991 dbms=xlsx replace;
proc tabulate data=TABBS99991 missing contents = ' ' format=COMMA6.0 S=[foreground=highlight.];
   class 'ALLOCATED_COLLEGE'n 'SUBJECT_DESC'n 'TERM_CODE'n;
   var INCLUDED_TUITION;
   keylabel Sum = " ";
   table ('ALLOCATED_COLLEGE'n) *('SUBJECT_DESC'n all = 'Total') all='Total', (('TERM_CODE'n  all = 'Total')*((N = Amount))) /
                  contents = ' ' misstext=' ' box={label = "ALLOCATED_COLLEGE/SUBJECT_DESC"};
 run;&lt;/PRE&gt;
&lt;P&gt;However, out of curiosity, why are you using named literals since all of your variables are valid SAS names?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 01:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350421#M81449</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-04-17T01:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350422#M81450</link>
      <description>&lt;P&gt;One guess: &amp;nbsp;It looks like the intent was to remove the variable name from the table. &amp;nbsp;If that's the case, the right syntax would use a blank within quotes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;table (ALLOCATED_COLLEGE = ' ') *(SUBJECT_DESC = ' ' all = 'Total') all='Total', ((TERM_CODE = ' ' all = 'Total')*((N = 'Amount'))) /
                  contents = ' ' misstext=' ' box={label = "ALLOCATED_COLLEGE/SUBJECT_DESC"};&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I also added quotes around the word Amount which looks like it should be the label for the N statistic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 02:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350422#M81450</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-17T02:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350424#M81451</link>
      <description>&lt;P&gt;The original program was using a single double quote character where you meant to use a blank string literal.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;You had " where you needed ' ' or " ".&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This also caused you to have unbalanced quotes since your program had an odd number of double quote characters.&lt;/P&gt;
&lt;P&gt;Once you change the double quote characters into quoted spaces instead you will probably still need to deal with the left over effect of submitting the original program with the unbalanced double quotes.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 02:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350424#M81451</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-17T02:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate and quoted string error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350670#M81532</link>
      <description>&lt;P&gt;got it that makes sense now thanks all&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 22:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-and-quoted-string-error/m-p/350670#M81532</guid>
      <dc:creator>robm</dc:creator>
      <dc:date>2017-04-17T22:57:24Z</dc:date>
    </item>
  </channel>
</rss>

