<?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 Status Handling always returning Success - what am I missing? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354207#M10605</link>
    <description>&lt;P&gt;OK...after doing some more research and testing, I see that my &amp;amp;trans_rc is always returning 0...thus, the reason that I am always getting Success.&amp;nbsp; So, if someone could, please tell me if I am on the right track here.&amp;nbsp; Since I am using User Written code, I am thinking that I need to take care of &amp;amp;trans_rc myself.&amp;nbsp; I can see in the default code that trans_rc is being set to 0...but then never set again.&amp;nbsp; So, I am thinking that I need to do something like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro RCSET(error);&lt;BR /&gt;%if (&amp;amp;error gt &amp;amp;TRANS_RC) %then&lt;BR /&gt;%let TRANS_RC=&amp;amp;error;&lt;BR /&gt;%if (&amp;amp;error gt &amp;amp;JOB_RC) %then&lt;BR /&gt;%let JOB_RC=&amp;amp;error;&lt;BR /&gt;%mend RCSET;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then call this macro after my differnt statements.&amp;nbsp; Am I on the right track here?&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>Thu, 27 Apr 2017 17:25:34 GMT</pubDate>
    <dc:creator>rgreen33</dc:creator>
    <dc:date>2017-04-27T17:25:34Z</dc:date>
    <item>
      <title>DI Studio Status Handling always returning Success - what am I missing?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354159#M10599</link>
      <description>&lt;P&gt;I have a job created in SAS DI Studio.&amp;nbsp; I have setup two actions for the job under Status Handling (Send Email on Success; Send Email on Error).&amp;nbsp; The email is working fine.&amp;nbsp; However, I am ALWAYS getting the SUCCESS email...never getting an error.&amp;nbsp; I have intentionally introduced an error into my code for testing this...but I am still getting the SUCCESS email.&amp;nbsp; My DI Studio job is essentially a single "User Written" node that is ETL'ing data to LASRLIB.&amp;nbsp; As you can see from the sreenshot below, my job is actually ending in an Error.&amp;nbsp; However, in the example below, I still get a Success email.&amp;nbsp; I have double checked my Status Handling setup.&amp;nbsp; I even attempted to remove the Success email, leaving only the Error email...and in this case, I get NO email.&amp;nbsp; What am I missing here?&amp;nbsp; I am new to SAS, so I am guessing that it is something obvious &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://communities.sas.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Capture.JPG" alt="Capture.JPG" src="https://communities.sas.com/t5/image/serverpage/image-id/8580iE6CB88ABE10D48E6/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&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>Thu, 27 Apr 2017 15:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354159#M10599</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-04-27T15:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Status Handling always returning Success - what am I missing?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354171#M10600</link>
      <description>&lt;P&gt;Just to add a little more detail to my original question.&amp;nbsp; I also attempt to move this Status Handling from the job level down to the tranformation level.&amp;nbsp; Since the User Written transformation does not have the tab for Status Handling, I added a "Return Code Check" to my diagram.&amp;nbsp; I removed the Status Handling at the job level and added an action for Success and Error on the Return Code Check transformation.&amp;nbsp; Unfortunately, I am still seeing the same results.&amp;nbsp; No matter what I try, I get the Success email.&amp;nbsp; I've got to be missing something here.&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>Thu, 27 Apr 2017 15:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354171#M10600</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-04-27T15:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Status Handling always returning Success - what am I missing?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354207#M10605</link>
      <description>&lt;P&gt;OK...after doing some more research and testing, I see that my &amp;amp;trans_rc is always returning 0...thus, the reason that I am always getting Success.&amp;nbsp; So, if someone could, please tell me if I am on the right track here.&amp;nbsp; Since I am using User Written code, I am thinking that I need to take care of &amp;amp;trans_rc myself.&amp;nbsp; I can see in the default code that trans_rc is being set to 0...but then never set again.&amp;nbsp; So, I am thinking that I need to do something like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro RCSET(error);&lt;BR /&gt;%if (&amp;amp;error gt &amp;amp;TRANS_RC) %then&lt;BR /&gt;%let TRANS_RC=&amp;amp;error;&lt;BR /&gt;%if (&amp;amp;error gt &amp;amp;JOB_RC) %then&lt;BR /&gt;%let JOB_RC=&amp;amp;error;&lt;BR /&gt;%mend RCSET;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and then call this macro after my differnt statements.&amp;nbsp; Am I on the right track here?&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>Thu, 27 Apr 2017 17:25:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354207#M10605</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-04-27T17:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: DI Studio Status Handling always returning Success - what am I missing?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354216#M10607</link>
      <description>&lt;P&gt;Well, I figured out what I am missing.&amp;nbsp; Essentially, since I am using User Written code, I must include the necessary code to set TRANS_RC (the actual macro code does not need to be included in the User Written code).&amp;nbsp; All that is needed is the necessary calls to set TRANS_RC.&amp;nbsp; This can be accomplished via the following calls (stratigically placed after certain statements within the code - the line that you use is also based on the statement that is being checked):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %RCSET(&amp;amp;syserr);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %RCSET(&amp;amp;syslibrc);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %RCSET(&amp;amp;sqlrc);&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>Thu, 27 Apr 2017 17:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-Studio-Status-Handling-always-returning-Success-what-am-I/m-p/354216#M10607</guid>
      <dc:creator>rgreen33</dc:creator>
      <dc:date>2017-04-27T17:49:41Z</dc:date>
    </item>
  </channel>
</rss>

