<?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: Getting syntax error i cannot figure out after dosubl function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740463#M231306</link>
    <description>i accepts 3 parameter the first being a string.   But the error i  get is for the connection statement i think and it looks correct  The errors are below the statement correct?</description>
    <pubDate>Tue, 11 May 2021 13:46:56 GMT</pubDate>
    <dc:creator>Gayle</dc:creator>
    <dc:date>2021-05-11T13:46:56Z</dc:date>
    <item>
      <title>Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740315#M231235</link>
      <description>&lt;P&gt;Hi i am trying to figure out syntax error i am getting.&amp;nbsp; This is in a data step: Is it from the dosubl or the %finnalload macro being called?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
9236
9237      data _null_;
9238      set tables_toload;
9239      put "contact date?";
9240      put contactdtpresent;
9241      put "extenidpresent?";
9242      put externidpresent;
9243      if &amp;amp;loadcnt &amp;gt; 0 then
9244          loadrc = dosubl('%finalload("tablename",contactdtpresent,externidpresent)');
9245      else
9246          put "Nothing to load, no tables passed all validations";
9247      run;

contact date?
0
extenidpresent?
0
ERROR 22-322: Syntax error, expecting one of the following: (, AS, LIKE.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 79-322: Expecting a ).
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: (, SELECT, SET, VALUES.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: ;, VALUES.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ',', INDEX, TABLE, VIEW.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', ANSIMISS, AS, CROSS,
              EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER,
              OUTER, RIGHT, UNION, WHERE.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: a name, (, ), ',', ANSIMISS, AS, CROSS,
              EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, OUTER,
              RIGHT, UNION, WHERE.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 22-322: Syntax error, expecting one of the following: a name, (, ), ',', ANSIMISS, AS, CROSS,
              EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, OUTER,
              RIGHT, UNION, WHERE.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.87 seconds
      cpu time            0.04 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 May 2021 21:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740315#M231235</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-05-10T21:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740316#M231236</link>
      <description>&lt;P&gt;Your code is showing what appear to be errors generated by the code in your macro %finalload.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is the value for the macro variable &amp;amp;loadcnt set and what is its value when this data step runs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest setting OPTIONS MPRINT and rerun the code. The Log may then show more details of the code actually generated that may help in debugging either the parameters sent to your macro or the actual macro code itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be prepared to share the code that creates the macro Finalload.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 21:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740316#M231236</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-10T21:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740323#M231243</link>
      <description>&lt;P&gt;Why are you running the data step if you are just going to push a sting literal to DOSUBL()?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run this code to see what you are asking DOSUBL() to run.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint;
%finalload("tablename",contactdtpresent,externidpresent)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How many observations are in&amp;nbsp;tables_toload?&lt;/P&gt;
&lt;P&gt;What does the macro variable LOADCNT contain?&amp;nbsp; You seem to treating it as a boolean expression.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 22:51:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740323#M231243</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-10T22:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740346#M231251</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MPRINT(FINALLOAD):   proc sql noprint;
MPRINT(FINALLOAD):   connect to teradata as abcd (username="bdxxx"
password="{SAS002}xxxx" tdpid=TDP1 mode=teradata fastload=yes);
&lt;FONT color="#333399"&gt;&lt;STRONG&gt;ERROR 22-322: Syntax error, expecting one of the following: (, AS, LIKE.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 79-322: Expecting a ).
ERROR 76-322: Syntax error, statement will be ignored
&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks for the suggestion of MPRINT ! i used it and it is in the macro.&amp;nbsp; I get this syntax error above below the&amp;nbsp; connection statement but I don't see what is wrong.&amp;nbsp; It is like my other connection statements that are working.&amp;nbsp; Do you see the error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 02:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740346#M231251</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-05-11T02:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740349#M231253</link>
      <description>&lt;P&gt;What does the macro do? What are the input parameters to it? How are the parameter values used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the macro call seems to have worked all we know so far is that it support at least three positional parameters.&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 02:47:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740349#M231253</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-11T02:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740463#M231306</link>
      <description>i accepts 3 parameter the first being a string.   But the error i  get is for the connection statement i think and it looks correct  The errors are below the statement correct?</description>
      <pubDate>Tue, 11 May 2021 13:46:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740463#M231306</guid>
      <dc:creator>Gayle</dc:creator>
      <dc:date>2021-05-11T13:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting syntax error i cannot figure out after dosubl function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740559#M231362</link>
      <description>&lt;P&gt;If you cannot get the macro to work when you are typing the code then getting it to work when you are generating code via a data step is going to be impossible.&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:30:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-syntax-error-i-cannot-figure-out-after-dosubl-function/m-p/740559#M231362</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-11T17:30:55Z</dc:date>
    </item>
  </channel>
</rss>

