<?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 cryptic error message from fedsql.execDirect in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959387#M374314</link>
    <description>&lt;P&gt;If I run the code like in an isolated manner, it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let outcas=casuser;
%let plant=XYZ;
%let installation1=OP10;

proc cas;
source ETL_AC;
		create table public.X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR2{options replace=true} as 
			select a.*, b.Mean as mean_recipe, b.Std as std_recipe,
						c.Mean as mean_batch_id, c.Std as std_batch_id,
						d._NDis_ as _NDis_batch_id,
						e._NDis_ as _NDis_recipe		
               from &amp;amp;incas..X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR a 
					left join &amp;amp;outcas..SUMMARY_A1 b 
						on a.RECIPE=b.RECIPE and a._NAME_=b.column
					left join &amp;amp;outcas..SUMMARY_A2 c 
						on a.batch_id=c.batch_id and a._NAME_=c.column
					left join &amp;amp;outcas..NDIST_A2 d 
						on a.batch_id=d.batch_id and a._NAME_=d._column_
					left join &amp;amp;outcas..NDIST_A1 e 
						on a.recipe=e.recipe and a._NAME_=e._column_    ;
endsource;
fedSQL.execDirect / query=ETL_AC;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the same code inside my flow throws out an error message which I don't understand at all.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;CODE class=" language-sas"&gt;ERROR: Syntax error at or near ".S"&lt;/CODE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;262  +
263  +proc cas;
264  +source ETL_AC;
265  +create
SYMBOLGEN:  Macro variable PLANT1 resolves to XYZ
SYMBOLGEN:  Macro variable INSTALLATION1 resolves to OP10
265 !+         table public.X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR{options replace=true} as
266  +select a.*, b.Mean as mean_recipe, b.Std as std_recipe,
267  +c.Mean as mean_batch_id, c.Std as std_batch_id,
268  +d._NDis_ as _NDis_batch_id,
269  +e._NDis_ as _NDis_recipe
SYMBOLGEN:  Macro variable INCAS resolves to public
SYMBOLGEN:  Macro variable PLANT1 resolves to XYZ
SYMBOLGEN:  Macro variable INSTALLATION1 resolves to OP10
270  +               from &amp;amp;incas..X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR a
271  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
271 !+          join &amp;amp;outcas..SUMMARY_A1 b
272  +on a.RECIPE=b.RECIPE and a._NAME_=b.column
273  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
273 !+          join &amp;amp;outcas..SUMMARY_A2 c
274  +on a.batch_id=c.batch_id and a._NAME_=c.column
275  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
275 !+          join &amp;amp;outcas..NDIST_A2 d
276  +on a.batch_id=d.batch_id and a._NAME_=d._column_
277  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
277 !+          join &amp;amp;outcas..NDIST_A1 e
278  +on a.recipe=e.recipe and a._NAME_=e._column_    ;
279  +endsource;
280  +fedSQL.execDirect / query=ETL_AC;
281  +quit;
NOTE: Active Session now MYSESSION.
ERROR: Syntax error at or near ".S"
ERROR: The action stopped due to errors.
NOTE: PROCEDURE CAS used (Total process time):
      real time           0.05 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2025 17:48:46 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2025-02-17T17:48:46Z</dc:date>
    <item>
      <title>cryptic error message from fedsql.execDirect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959387#M374314</link>
      <description>&lt;P&gt;If I run the code like in an isolated manner, it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let outcas=casuser;
%let plant=XYZ;
%let installation1=OP10;

proc cas;
source ETL_AC;
		create table public.X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR2{options replace=true} as 
			select a.*, b.Mean as mean_recipe, b.Std as std_recipe,
						c.Mean as mean_batch_id, c.Std as std_batch_id,
						d._NDis_ as _NDis_batch_id,
						e._NDis_ as _NDis_recipe		
               from &amp;amp;incas..X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR a 
					left join &amp;amp;outcas..SUMMARY_A1 b 
						on a.RECIPE=b.RECIPE and a._NAME_=b.column
					left join &amp;amp;outcas..SUMMARY_A2 c 
						on a.batch_id=c.batch_id and a._NAME_=c.column
					left join &amp;amp;outcas..NDIST_A2 d 
						on a.batch_id=d.batch_id and a._NAME_=d._column_
					left join &amp;amp;outcas..NDIST_A1 e 
						on a.recipe=e.recipe and a._NAME_=e._column_    ;
endsource;
fedSQL.execDirect / query=ETL_AC;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the same code inside my flow throws out an error message which I don't understand at all.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;CODE class=" language-sas"&gt;ERROR: Syntax error at or near ".S"&lt;/CODE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;262  +
263  +proc cas;
264  +source ETL_AC;
265  +create
SYMBOLGEN:  Macro variable PLANT1 resolves to XYZ
SYMBOLGEN:  Macro variable INSTALLATION1 resolves to OP10
265 !+         table public.X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR{options replace=true} as
266  +select a.*, b.Mean as mean_recipe, b.Std as std_recipe,
267  +c.Mean as mean_batch_id, c.Std as std_batch_id,
268  +d._NDis_ as _NDis_batch_id,
269  +e._NDis_ as _NDis_recipe
SYMBOLGEN:  Macro variable INCAS resolves to public
SYMBOLGEN:  Macro variable PLANT1 resolves to XYZ
SYMBOLGEN:  Macro variable INSTALLATION1 resolves to OP10
270  +               from &amp;amp;incas..X_&amp;amp;plant1._ICS_&amp;amp;installation1._PROC_TR a
271  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
271 !+          join &amp;amp;outcas..SUMMARY_A1 b
272  +on a.RECIPE=b.RECIPE and a._NAME_=b.column
273  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
273 !+          join &amp;amp;outcas..SUMMARY_A2 c
274  +on a.batch_id=c.batch_id and a._NAME_=c.column
275  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
275 !+          join &amp;amp;outcas..NDIST_A2 d
276  +on a.batch_id=d.batch_id and a._NAME_=d._column_
277  +left
SYMBOLGEN:  Macro variable OUTCAS resolves to CASUSER
SYMBOLGEN:  Some characters in the above value which were subject to macro quoting have been unquoted for printing.
277 !+          join &amp;amp;outcas..NDIST_A1 e
278  +on a.recipe=e.recipe and a._NAME_=e._column_    ;
279  +endsource;
280  +fedSQL.execDirect / query=ETL_AC;
281  +quit;
NOTE: Active Session now MYSESSION.
ERROR: Syntax error at or near ".S"
ERROR: The action stopped due to errors.
NOTE: PROCEDURE CAS used (Total process time):
      real time           0.05 seconds
      cpu time            0.01 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 17:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959387#M374314</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-02-17T17:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: cryptic error message from fedsql.execDirect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959388#M374315</link>
      <description>&lt;P&gt;Possibly related the message about macro quoting?&amp;nbsp; Macro quoting can confuse the SAS syntax parser.&amp;nbsp; Try removing the macro quoting.&lt;/P&gt;
&lt;P&gt;Perhaps add this statement before your PROC CAS statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let outcas=%unquote(&amp;amp;outcas);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Feb 2025 18:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959388#M374315</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-17T18:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: cryptic error message from fedsql.execDirect</title>
      <link>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959391#M374316</link>
      <description>&lt;P&gt;That fixes the problem Tom &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 18:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/cryptic-error-message-from-fedsql-execDirect/m-p/959391#M374316</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-02-17T18:34:15Z</dc:date>
    </item>
  </channel>
</rss>

