<?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: Returning _webout from JES API in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968153#M2873</link>
    <description>Does changing the argument for your jobRequest "_OMITSESSIONRESULTS" to "false" change the behavior back to providing _webout?&lt;BR /&gt;</description>
    <pubDate>Wed, 04 Jun 2025 14:03:55 GMT</pubDate>
    <dc:creator>gwootton</dc:creator>
    <dc:date>2025-06-04T14:03:55Z</dc:date>
    <item>
      <title>Returning _webout from JES API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/966992#M2857</link>
      <description>&lt;P&gt;The behaviour of the JES API appears to have changed in the last year or so, and we need some help getting our (previously functional) code to work!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are running a Job (using POST /jobExecution/jobs&amp;nbsp; - &lt;A href="https://developer.sas.com/rest-apis/jobExecution/createJob" target="_blank" rel="noopener"&gt;https://developer.sas.com/rest-apis/jobExecution/createJob&lt;/A&gt;&amp;nbsp;) that returns a JSON file generated using the following code (as described &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_063/jobexecug/p1o1jhprwz15oun15w3duo6qrvc3.htm" target="_self"&gt;here )&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename _webout filesrvc parenturi="&amp;amp;SYS_JES_JOB_URI" name="_webout.json";

data _null_;
  file _webout;
  put '{"name" : "value")';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The exact API request looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanBowe_0-1747731916447.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107163iA1D1FA3EDC4F6B63/image-size/large?v=v2&amp;amp;px=999" role="button" title="AllanBowe_0-1747731916447.png" alt="AllanBowe_0-1747731916447.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the following payload:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanBowe_1-1747731916449.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107164i8C71996B37A67779/image-size/large?v=v2&amp;amp;px=999" role="button" title="AllanBowe_1-1747731916449.png" alt="AllanBowe_1-1747731916449.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We then poll for results using:&amp;nbsp; /jobExecution/jobs/db8810ec-7282-4093-a0f9-41f693ebf359/state?_action=wait&amp;amp;wait=300&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And finally fetch the results using: /jobExecution/jobs/db8810ec-7282-4093-a0f9-41f693ebf359&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the following response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanBowe_2-1747731916451.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107165i6C653DC0E7351A5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="AllanBowe_2-1747731916451.png" alt="AllanBowe_2-1747731916451.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have tried tweaking the arguments, to no avail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The _webout fileref is definitely created.&amp;nbsp; We have also tried using the RESULTFILE option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanBowe_3-1747733439403.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107166iC532D58200BB27F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="AllanBowe_3-1747733439403.png" alt="AllanBowe_3-1747733439403.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to get the _webout result location returned to the JES API triggered Job?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 09:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/966992#M2857</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2025-05-20T09:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Returning _webout from JES API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968153#M2873</link>
      <description>Does changing the argument for your jobRequest "_OMITSESSIONRESULTS" to "false" change the behavior back to providing _webout?&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968153#M2873</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2025-06-04T14:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Returning _webout from JES API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968308#M2875</link>
      <description>&lt;P&gt;Unfortunately not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I went and created a SASjs project to illustrate the issue.&amp;nbsp; &amp;nbsp;You can deploy it to Viya in 3 lines of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="pl-k"&gt;&lt;SPAN class="pl-c1"&gt;%let&lt;/SPAN&gt; &lt;SPAN class="pl-en"&gt;apploc&lt;/SPAN&gt;&lt;/SPAN&gt;=&lt;SPAN class="pl-k"&gt;/&lt;/SPAN&gt;Public&lt;SPAN class="pl-k"&gt;/&lt;/SPAN&gt;jes_demo; /* your preferred SAS Drive location */
&lt;SPAN class="pl-c1"&gt;filename&lt;/SPAN&gt; demo url
 &lt;SPAN class="pl-s"&gt;"https://raw.githubusercontent.com/allanbowe/jes_issue/refs/heads/main/viya.sas"&lt;/SPAN&gt;;
&lt;SPAN class="pl-k"&gt;&lt;SPAN class="pl-c1"&gt;%inc&lt;/SPAN&gt; &lt;SPAN class="pl-en"&gt;demo&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;In the last line of the log there is a link to a Job - this contains the PROC HTTP calls that illustrate the problem (preceded by some supporting macro definitions).&amp;nbsp; Copy that URL into a browser and add "&amp;amp;_DEBUG=2477"&amp;nbsp; before submitting.&lt;BR /&gt;&lt;BR /&gt;This will show the log and the reponses from the HTTP calls.&amp;nbsp; You can edit that job directly, eg to play around with the request body.&amp;nbsp; Just save the job definition and refresh the browser for the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source code for the project is here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/allanbowe/jes_issue" target="_blank"&gt;https://github.com/allanbowe/jes_issue&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 22:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968308#M2875</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2025-06-05T22:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Returning _webout from JES API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968478#M2877</link>
      <description>&lt;P&gt;Finally figured it out - was triggered by this usage note:&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/zh-cn/sasadmincdc/v_021/caljobs/n0t21mf756sv0en1kd176kky8upt.htm" target="_blank"&gt;https://documentation.sas.com/doc/zh-cn/sasadmincdc/v_021/caljobs/n0t21mf756sv0en1kd176kky8upt.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Turns out that the behaviour changed in February this year, and now&amp;nbsp;&lt;SPAN&gt;_omitSessionResults is both mandatory (if you want the results) and -&amp;nbsp;&lt;STRONG&gt;CASE SENSITIVE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This smells like a bug and it's currently in SAS track, case number&amp;nbsp;CS0254721&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The fix to the SASjs adapter is here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/adapter/pull/845/files" target="_blank"&gt;https://github.com/sasjs/adapter/pull/845/files&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And the fix to SASjs Core is here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/core/pull/397/files" target="_blank"&gt;https://github.com/sasjs/core/pull/397/files&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 20:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Returning-webout-from-JES-API/m-p/968478#M2877</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2025-06-09T20:00:26Z</dc:date>
    </item>
  </channel>
</rss>

