<?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 Job: Status Handling/Send Email - how can I include HOSTNAME? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357427#M274267</link>
    <description>&lt;P&gt;You could try automatic macro variable &amp;amp;syshostname.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 11:59:08 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-05-10T11:59:08Z</dc:date>
    <item>
      <title>DI Studio Job: Status Handling/Send Email - how can I include HOSTNAME?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357425#M274266</link>
      <description>&lt;P&gt;First, let me start by saying that I am new to the SAS world.&amp;nbsp; So, it is possible that I am overlooking the obvious. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially, I have a DI Studio job that includes 2 controls:&amp;nbsp; User Written; Return Code Check.&amp;nbsp; Everything is working as expected.&amp;nbsp; On the Return Code Check, I am checking the status of my job, and sending emails on "Error" and "Successful".&amp;nbsp; I have 2 environments:&amp;nbsp;DEV; PROD.&amp;nbsp; My jobs are setup and running in both environments.&amp;nbsp; Thus, when I get the emails, it is hard to determine which environment the email is from.&amp;nbsp; So, I would like to include the HOSTNAME in the email (I could use Outlook rules to key on this and do things for Errors).&amp;nbsp; Obviously, I can hardcode the host into the email, which is exactly what I am current doing.&amp;nbsp; My email for "Error" currently looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;SASPROD&lt;/STRONG&gt;&lt;/EM&gt; -&amp;gt; Error: &amp;amp;etls_jobName (&amp;amp;jobID); TRANS_RD = &amp;amp;trans_rc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This&amp;nbsp;becomes a problem when I promote a new (or updated) job from DEV to PROD, as I always have to remember to modify the Status Handling on each job...updating the HOSTNAME.&amp;nbsp; I have attempted to use &amp;amp;HOSTNAME, but that throws an error.&amp;nbsp; I would like to automatically include the HOSTNAME, server name, or something, that will automatically indicate which environment the message is from.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your time and help,&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 11:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357425#M274266</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-05-10T11:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Job: Status Handling/Send Email - how can I include HOSTNAME?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357427#M274267</link>
      <description>&lt;P&gt;You could try automatic macro variable &amp;amp;syshostname.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 11:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357427#M274267</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-10T11:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Job: Status Handling/Send Email - how can I include HOSTNAME?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357448#M274268</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANK YOU!!!&amp;nbsp; That is exactly what I was looking for.&amp;nbsp; I tried searching for everything and could not find this.&amp;nbsp; So, is there a list of these automatic macro variables that you can point me to?&amp;nbsp; Also, in User Written code, is there a preference as to whether you use these automatic macros variables v.s. global environment variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thanks for your help,&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 12:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357448#M274268</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-05-10T12:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Job: Status Handling/Send Email - how can I include HOSTNAME?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357449#M274269</link>
      <description>&lt;P&gt;When you issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put _all_;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you get a listing of all currently defined macro variables; this is handy when you're looking for something.&lt;/P&gt;
&lt;P&gt;Automatic macro variables are more or less platform-independent, while using %sysget() to utilize OS environment variables might give you additional information that SAS doesn't/can't provide.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 12:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357449#M274269</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-10T12:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Job: Status Handling/Send Email - how can I include HOSTNAME?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357459#M274271</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is great stuff!&amp;nbsp; Thanks for your help.&amp;nbsp; Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ricky&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 13:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DI-Studio-Job-Status-Handling-Send-Email-how-can-I-include/m-p/357459#M274271</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-05-10T13:07:38Z</dc:date>
    </item>
  </channel>
</rss>

