<?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: SAS ERROR: All positional parameters must precede keyword parameters. in Developers</title>
    <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175734#M4266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does &amp;amp;&amp;amp;var1 resolve to? If it contains an embedded comma then it could cause the error you are getting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Oct 2014 04:30:24 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2014-10-08T04:30:24Z</dc:date>
    <item>
      <title>SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175733#M4265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stored Process is supposed to pass parameters to xls_output.sas file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the first this was working, not sure why did I need data7= because without that it didn't work &lt;/P&gt;&lt;P&gt;SAS file&lt;/P&gt;&lt;P&gt;%macro xls_output(data1=, data2=, data4=, MTM_Status=, data5=, data6=, data7=);&lt;/P&gt;&lt;P&gt;Stored Process&lt;/P&gt;&lt;P&gt;%xls_output&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (data1=aaa, data2=bbb, data4=ddd, data5=eee, data6=fff, MTM_Status=&amp;amp;&amp;amp;var1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This didn't work&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;SAS file&lt;/P&gt;&lt;P&gt;%macro xls_output(data1=, data2=, data4=, MTM_Status=, data5=, data6=);&lt;/P&gt;&lt;P&gt;Stored Process&lt;/P&gt;&lt;P&gt;%xls_output&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (data1=aaa, data2=bbb, data4=ddd, data5=eee, data6=fff, MTM_Status=&amp;amp;&amp;amp;var1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;SAS file&lt;/P&gt;&lt;P&gt;%macro xls_output(data1=, data2=, data4=, MTM_Status=, data5=, data6=);&lt;/P&gt;&lt;P&gt;Stored Process&lt;/P&gt;&lt;P&gt;%xls_output&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (data1=aaa, data2=bbb, data4=ddd, MTM_Status=&amp;amp;&amp;amp;var1, data5=eee, data6=fff);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now after I added data3 it didn't work again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a)&lt;/P&gt;&lt;P&gt;SAS file&lt;/P&gt;&lt;P&gt;%macro xls_output(data1=, data2=, data3=, data4=, MTM_Status=, data5=, data6=, data7=);&lt;/P&gt;&lt;P&gt;Stored Process&lt;/P&gt;&lt;P&gt;%xls_output&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (data1=aaa, data2=bbb, data3=ccc, data4=ddd, data5=eee, data6=fff, MTM_Status=&amp;amp;&amp;amp;var1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I got SAS Error below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;SAS ERROR: All positional parameters must precede keyword parameters. ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b)&lt;/P&gt;&lt;P&gt;After I tried this (didn't work and didn't get any error but Stored Process failed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS file&lt;/P&gt;&lt;P&gt;%macro xls_output(data1=, data2=, data3=, data4=, MTM_Status=, data5=, data6=);&lt;/P&gt;&lt;P&gt;Stored Process&lt;/P&gt;&lt;P&gt;%xls_output&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (data1=aaa, data2=bbb, data3=ccc, data4=ddd, MTM_Status=&amp;amp;&amp;amp;var1, data5=eee, data6=fff);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then just for curiosity tried again a) but didn't get Error&lt;/P&gt;&lt;P&gt;SAS ERROR: All positional parameters must precede keyword parameters. ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I am definitely confused. Any help is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 03:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175733#M4265</guid>
      <dc:creator>pope1970</dc:creator>
      <dc:date>2014-10-08T03:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175734#M4266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does &amp;amp;&amp;amp;var1 resolve to? If it contains an embedded comma then it could cause the error you are getting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 04:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175734#M4266</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-10-08T04:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175735#M4267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with &lt;A __default_attr="312252" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; re &amp;amp;&amp;amp;var1 possibly having an embedded comma. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also suggest you try debugging the macro code outside of the stored process setting (i.e. using DM SAS, or Enterprise guide code window, or whatever).&amp;nbsp; A stored process is just SAS code.&amp;nbsp; Sometimes it's easiest to get the SAS code working first, and then wrap it inside a stored process.&amp;nbsp; Often my stored process source code is just a %INCLUDE of a .sas file or a macro call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 12:48:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175735#M4267</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-10-08T12:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175736#M4268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;amp;&amp;amp;var1does not have comma and Stored Process works perfectly in EG without xls_output statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 14:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175736#M4268</guid>
      <dc:creator>pope1970</dc:creator>
      <dc:date>2014-10-08T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175737#M4269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does &amp;amp;&amp;amp;var1 resolve to? Other characters than comma may be an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also are the examples provided EXACTLY the same submitted or did you replace actual values with examples? If so, post an actual example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, does your %xls_output&amp;nbsp; macro call any others? The actual issue might be in what the outer macro passes to the inner ones. Your comment "At the first this was working, not sure why did I need data7= because without that it didn't work" raises a number of questions about the role that data7 plays.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 14:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175737#M4269</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-10-08T14:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR: All positional parameters must precede keyword parameters.</title>
      <link>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175738#M4270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In&amp;nbsp; EG program window, I would paste the definition of %xls_output, i.e.:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro xls_output(...);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;%mend xls_output;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And debug xls_output there, testing different ways to invoke it with different parameters etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think &amp;amp;&amp;amp;var1 is still suspicious.&amp;nbsp; You could add %put _local_ to your stored process code to see what it resolves to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not clear what you mean by "didn't work" (got an error message? didn't run? ran but you didn't like the results).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you are at the point where you understand how %xls_output works and how it can be invoked, that should help with debugging your stored process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Oct 2014 15:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/SAS-ERROR-All-positional-parameters-must-precede-keyword/m-p/175738#M4270</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-10-08T15:42:47Z</dc:date>
    </item>
  </channel>
</rss>

