<?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: Different types of in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587456#M17965</link>
    <description>&lt;P&gt;Yes, it is documented and not that hard to find using Google.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SYSRC automatic macro variable is populated with a return code that corresponds to any ERRORLEVEL value returned when an operating system command is executed by certain SAS statements. &lt;FONT color="#FF0000"&gt;The value that SYSRC returns depends on the underlying operating system.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Also: Be very clear not to confuse the macro variable &amp;amp;sysrc with the macro %sysrc&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;A href="http://www.sascommunity.org/wiki/SYSRC_automatic_macro_variable" target="_blank"&gt;http://www.sascommunity.org/wiki/SYSRC_automatic_macro_variable&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Using &amp;amp;syscc is eventually easier.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2019 08:43:09 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-09-10T08:43:09Z</dc:date>
    <item>
      <title>Different types of &amp;job_rc</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587438#M17962</link>
      <description>&lt;P&gt;May I know what are the different types of &amp;amp;job_rc available for a DI Jobs? I know that 0 denotes successful run and I would like to know about other return codes which I'm unable to find it in the document.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 07:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587438#M17962</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2019-09-10T07:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Different types of &amp;job_rc</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587443#M17963</link>
      <description>&lt;P&gt;Assuming this question is related to here&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-tracking-details/m-p/586679#M17938" target="_blank"&gt;https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Job-tracking-details/m-p/586679#M17938&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;Why don't you just define 3 actions in the transformation - success, warning and error - and then have a look in the generated code which return code ranges are used to select these 3 different conditions.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 08:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587443#M17963</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-10T08:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Different types of</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587448#M17964</link>
      <description>I got it but still I would like to know the ranges for &amp;amp;job_rc.&lt;BR /&gt;&lt;BR /&gt;Is this not documented any where?&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Sep 2019 08:07:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587448#M17964</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2019-09-10T08:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Different types of</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587456#M17965</link>
      <description>&lt;P&gt;Yes, it is documented and not that hard to find using Google.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SYSRC automatic macro variable is populated with a return code that corresponds to any ERRORLEVEL value returned when an operating system command is executed by certain SAS statements. &lt;FONT color="#FF0000"&gt;The value that SYSRC returns depends on the underlying operating system.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Also: Be very clear not to confuse the macro variable &amp;amp;sysrc with the macro %sysrc&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;A href="http://www.sascommunity.org/wiki/SYSRC_automatic_macro_variable" target="_blank"&gt;http://www.sascommunity.org/wiki/SYSRC_automatic_macro_variable&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Using &amp;amp;syscc is eventually easier.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 08:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/587456#M17965</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-10T08:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Different types of job status code for DIS job</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/588147#M17981</link>
      <description>&lt;P&gt;I want to capture the Status of DIS Job in one variable. In order to do that I write the code as below in user written code Transformation and connected it to the previous dataset and removed the mapping.&amp;nbsp; So my DIS Job flow Looks like dataset-&amp;gt;table loader-&amp;gt;dataset-&amp;gt;user written code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;STAT_CD="&amp;amp;SYSRC.";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So if my Job has warning in any of the Transformation including the user written Transformation, I want to capture the respective return code to the STAT_CD. However it is always showing as '0' even though there is warning in any of the transfomation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to correct this issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 09:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/588147#M17981</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2019-09-12T09:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Different types of job status code for DIS job</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/588812#M17993</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8409"&gt;@Babloo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's because &amp;amp;sysrc is the wrong automatic variable for this purpose. You need to use &amp;amp;syscc&lt;/P&gt;
&lt;P&gt;BUT.... You are using DIS and DIS generated code has already heaps of in-built error checking and capturing. I believe you would get faster to a better result if you start writing your own code based on what DIS already generates.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For what you're trying to do why not right-click on a job canvas and define status handling as below. Then go into the code and inspect what gets generated. If that's not already what you need then use at least this code as a starting point for your own implementation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 559px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32477iB7AF46CD88A23C21/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What the DIS generated code will give you are things like:&lt;/P&gt;
&lt;P&gt;- It uses the DIS maintained macro variable for the job condition code.&lt;/P&gt;
&lt;P&gt;- It handles the case where an upstream error condition sets SAS into syntax check mode&lt;/P&gt;
&lt;P&gt;-.......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What any "in-job" status reporting can't handle: Cases where the job terminates (i.e. via abort statement) before it reaches the status reporting logic. If you also want to report such cases then you need to execute a separate process outside of the DIS job like for example proposed&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Smart-way-to-add-code-in-all-programs/m-p/588512#M168208" target="_self"&gt;here&lt;/A&gt; by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2019 09:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Different-types-of-amp-job-rc/m-p/588812#M17993</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-15T09:14:34Z</dc:date>
    </item>
  </channel>
</rss>

