<?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: DI Studio: Access a macro variable created in pre-processing of a job in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65182#M14147</link>
    <description>Is your pre-processing running on the same SAS server as your SQL ?&lt;BR /&gt;
&lt;BR /&gt;
If 'yes' then your will find rsubmit in the genereated code/log.&lt;BR /&gt;
&lt;BR /&gt;
You can 'lift' a SAS macro like using sysrput by defining parameters in DI studio.</description>
    <pubDate>Mon, 22 Dec 2008 22:26:33 GMT</pubDate>
    <dc:creator>GertNissen</dc:creator>
    <dc:date>2008-12-22T22:26:33Z</dc:date>
    <item>
      <title>DI Studio: Access a macro variable created in pre-processing of a job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65179#M14144</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I have created a macro variable in the pre-processing of a job.&lt;BR /&gt;
&lt;BR /&gt;
[...]&lt;BR /&gt;
%let jobname = %substr(&amp;amp;etls_jobname,1,5);&lt;BR /&gt;
[...]&lt;BR /&gt;
&lt;BR /&gt;
Now I would like to access it in the post-processing via a PROC SQL but it cant be resolved there.&lt;BR /&gt;
&lt;BR /&gt;
[...]&lt;BR /&gt;
WHERE jobname LIKE "&amp;amp;jobname" &lt;BR /&gt;
[...]&lt;BR /&gt;
&lt;BR /&gt;
I can't use &amp;amp;etls_jobname here, because it gets overwritten while some other jobs run via %include.&lt;BR /&gt;
&lt;BR /&gt;
Any idea how I can resolve this?&lt;BR /&gt;
&lt;BR /&gt;
Thanks a lot in advance and best regards,&lt;BR /&gt;
Thomas</description>
      <pubDate>Tue, 09 Dec 2008 12:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65179#M14144</guid>
      <dc:creator>ThomasH</dc:creator>
      <dc:date>2008-12-09T12:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: Access a macro variable created in pre-processing of a job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65180#M14145</link>
      <description>Hi:&lt;BR /&gt;
  This may come down to whether your macro variable is GLOBAL or LOCAL in scope, which is where the [...] becomes significant. It also depends on how and where you're running your code, whether the macro variables created on one session or server are even still available after a process closes. Depending on your configuration, a process or job that launches in a single-user session may clean up after itself, so that no macro variables are left in the Global Symbol Table on that server when the job finishes.&lt;BR /&gt;
 &lt;BR /&gt;
  I suggest you contact SAS Tech support for more help. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 09 Dec 2008 17:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65180#M14145</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-09T17:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: Access a macro variable created in pre-processing of a job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65181#M14146</link>
      <description>Like Cynthia suggests:&lt;BR /&gt;
[...]&lt;BR /&gt;
%global jobname;&lt;BR /&gt;
%let jobname = %substr(&amp;amp;etls_jobname,1,5);&lt;BR /&gt;
[...]&lt;BR /&gt;
&lt;BR /&gt;
...and if you didn't do something 'exotic' in your job you'll have the macro var available in the post-processing part of this job.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick</description>
      <pubDate>Fri, 12 Dec 2008 22:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65181#M14146</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2008-12-12T22:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio: Access a macro variable created in pre-processing of a job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65182#M14147</link>
      <description>Is your pre-processing running on the same SAS server as your SQL ?&lt;BR /&gt;
&lt;BR /&gt;
If 'yes' then your will find rsubmit in the genereated code/log.&lt;BR /&gt;
&lt;BR /&gt;
You can 'lift' a SAS macro like using sysrput by defining parameters in DI studio.</description>
      <pubDate>Mon, 22 Dec 2008 22:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Access-a-macro-variable-created-in-pre-processing-of-a/m-p/65182#M14147</guid>
      <dc:creator>GertNissen</dc:creator>
      <dc:date>2008-12-22T22:26:33Z</dc:date>
    </item>
  </channel>
</rss>

