<?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: Specifying Option Values before the generated stpbegin macro call in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29123#M4019</link>
    <description>Hi, Don:&lt;BR /&gt;
  I don't have a current install to test, but someplace on the SP setup screens, there was a way to check whether to include code for the macros -- in EG 4.1, it was 3 little check boxes at the bottom of one step. I'm not sure whether that still exists in EG 4.2. I remember the place that you could check was on the step where the code was showing.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Fri, 11 Dec 2009 15:08:39 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2009-12-11T15:08:39Z</dc:date>
    <item>
      <title>Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29122#M4018</link>
      <description>I have written a stored process that my user/client wants to be able to edit in EG 4.2 (I wrote it using SAS on the server). The stored process generates a landscape PDF report. I have specified _odsDest as a hidden parameter with a value of PDF to create a PDF report. I also added:&lt;BR /&gt;
&lt;BR /&gt;
options orientation=landscape;&lt;BR /&gt;
&lt;BR /&gt;
before the &lt;I&gt;&lt;B&gt;stpbegin&lt;/B&gt;&lt;/I&gt; call to create a landscape report. However when the stored process is edited in EG it inserts an extra stpbegin above that code, thus causing the report to be generated as portrait.&lt;BR /&gt;
&lt;BR /&gt;
How can allow him to edit it in EG, yet preserve the landscape option. I did not see any options/settings in EG that would allow me to do that.</description>
      <pubDate>Fri, 11 Dec 2009 01:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29122#M4018</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2009-12-11T01:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29123#M4019</link>
      <description>Hi, Don:&lt;BR /&gt;
  I don't have a current install to test, but someplace on the SP setup screens, there was a way to check whether to include code for the macros -- in EG 4.1, it was 3 little check boxes at the bottom of one step. I'm not sure whether that still exists in EG 4.2. I remember the place that you could check was on the step where the code was showing.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 11 Dec 2009 15:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29123#M4019</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-12-11T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29124#M4020</link>
      <description>On the second page of the stored process wizard there is a "Include code for" drop down button.  From this you can uncheck the "Stored process macros" which will suppress the generation of the %STPBEGIN/%STPEND macros.  If you uncheck this you will have to manually insert the %STPBEGIN/%STPEND macros, but you also have full control over where to place them.</description>
      <pubDate>Fri, 11 Dec 2009 16:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29124#M4020</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-11T16:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29125#M4021</link>
      <description>Thanks Greg and Cynthia. Worked just as you explained.&lt;BR /&gt;
&lt;BR /&gt;
I did notice however that EG was issuing a warning that the option to generate stpbegin/stpend was turned off AND they were not inclulded in the code. But they were included in the code. I finally determined that the problem appears to be that EG is looking for the macro calls with a semicolon (;). So I was able to change the code so that message is not generated.&lt;BR /&gt;
&lt;BR /&gt;
However, macros should not require semicolons.</description>
      <pubDate>Tue, 15 Dec 2009 13:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29125#M4021</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2009-12-15T13:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29126#M4022</link>
      <description>Hi, Don...that little extra semicolon in a macro call dates back to SAS/IntrNet days. We used to have to teach students to explicitly put the ';' when they used macro programs in Application Dispatcher code. It was something about how a token needed to be provided -- I've forgotten exactly why that was. But I noticed that it carried over to stored processes. My guess is that's because the stored process server is very like the old Application Dispatcher APPSRV. Just a guess.&lt;BR /&gt;
 &lt;BR /&gt;
(I feel your pain.)&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 15 Dec 2009 17:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29126#M4022</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-12-15T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29127#M4023</link>
      <description>The issue is not really IntrNet as I think the problem is a very old one. I actually discovered it (and reported it) back in the early 80s. If a macro can have parameters, &lt;B&gt;and&lt;/B&gt; no parameter values are specified (i.e., there are no parens), &lt;B&gt;and&lt;/B&gt; the macro call is the last token in the program, the SAS wordscanner issues an error for &lt;I&gt;Unexpected End of File&lt;/I&gt; since it is looking for parens.&lt;BR /&gt;
&lt;BR /&gt;
The correct (IMO) way to handle this is to call the macro as:&lt;BR /&gt;
&lt;BR /&gt;
%stpend()&lt;BR /&gt;
&lt;BR /&gt;
instead of putting a semicolon at the end. As long as the stpend macro is not the last token, there is no error.</description>
      <pubDate>Tue, 15 Dec 2009 17:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29127#M4023</guid>
      <dc:creator>DonH</dc:creator>
      <dc:date>2009-12-15T17:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Option Values before the generated stpbegin macro call</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29128#M4024</link>
      <description>Sorry, I did not mean to imply that the issue came with IntrNet.&lt;BR /&gt;
&lt;BR /&gt;
In fact, we've always taught the use of () in our macro class for the reason you state. &lt;BR /&gt;
&lt;BR /&gt;
However, in Education classes, we first explicitly showed using a semi-colon as a closing token when we wrote the first SAS/IntrNet class. And, the stored process doc explicitly mentions the need to use a closing ; for %STPBEGIN/%STPEND &lt;BR /&gt;
here in the doc:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/stpmacro.html" target="_blank"&gt;http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/stpmacro.html&lt;/A&gt;&lt;BR /&gt;
    &lt;BR /&gt;
where it says:&lt;BR /&gt;
"Note: You must include a semicolon at the end of the %STPBEGIN and %STPEND macro calls."&lt;BR /&gt;
 &lt;BR /&gt;
So even though I agree with your understanding of how macro invocation works/should work, the closing semicolon is documented explicitly for %STPBEGIN/%STPEND. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 15 Dec 2009 18:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Specifying-Option-Values-before-the-generated-stpbegin-macro/m-p/29128#M4024</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-12-15T18:09:17Z</dc:date>
    </item>
  </channel>
</rss>

