<?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: how to use parameters from VA calling a job via URL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971476#M377344</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure I fully understand why you can't use a DDC object. If you want, you can define a job URL in the DDC object and it will allow you to use JavaScript in your HTML form to retrieve the values passed by the VA report to the DDC object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides that, I think the solution to your problem can be the job chaining macros described &lt;A href="https://go.documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/p156d31f0trw0mn13venyxhwl8wz.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have questions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xavier&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2025 13:54:50 GMT</pubDate>
    <dc:creator>XavierBizoux</dc:creator>
    <dc:date>2025-07-25T13:54:50Z</dc:date>
    <item>
      <title>how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971108#M377257</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot figure out how to use the VA's parameters in the prompt's dataset as filters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my attempt.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The macro variable var_model is associated with the last combobox' choice in the xml prompt and once submitted should become assigned.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought about triggering 2 times the execute _action. But doing so gives an error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global var_model make type;

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");
caslib _all_ assign;

cas mySession sessopts=(caslib="dev");
libname mycas cas caslib='dev';

%if ^%symexist(var_model) %then %do;

proc casutil;
	droptable casdata="cars2" quiet;
run;

/* data mycas.cars2(promote=yes); */
	data work.cars2;
	set mycas.cars;
	where make="&amp;amp;make" and type="&amp;amp;type";
run;

%end;

%if %symexist(var_model) %then %do;
/* proc print data=mycas.cars2; */
	proc print data=work.cars2;
	where model="&amp;amp;model";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de pantalla 2025-07-18 180202.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108452i67A9B36BF173F52D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura de pantalla 2025-07-18 180202.png" alt="Captura de pantalla 2025-07-18 180202.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de pantalla 2025-07-18 180115.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/108453i85779601DFB3251C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura de pantalla 2025-07-18 180115.png" alt="Captura de pantalla 2025-07-18 180115.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2025 16:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971108#M377257</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-07-18T16:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971198#M377287</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114048"&gt;@XavierBizoux&lt;/a&gt;, I'm trying to insert a _program statement in the XML. But I'm not sure if it's a promising approach.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I've found the following article that could be key to achieving what I pretend.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/n1jj26acxr0ictn1riqgxoxrcehu.htm#p16740onala63yn1b33hclbasl0m" target="_self"&gt;https://documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/n1jj26acxr0ictn1riqgxoxrcehu.htm#p16740onala63yn1b33hclbasl0m&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 09:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971198#M377287</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-07-21T09:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971365#M377301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm not sure to understand what you mean by inserting a _program statement in the XML. Could you please give a bit more context about what you are trying to achieve?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xavier&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2025 07:11:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971365#M377301</guid>
      <dc:creator>XavierBizoux</dc:creator>
      <dc:date>2025-07-23T07:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971471#M377343</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114048"&gt;@XavierBizoux&lt;/a&gt;, due to current setup restrictions I can work only with Job Contents or URLs appointing a job from Visual Analytics, DDC solutions are at this moment out of scope.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I've noticed, a job content cannot carry parameters nor establish actions with other VA objects. Therefore the most promising solution in my opinion is to create a job with a prompt from Job Execution and link to it with an URL call from a list table or cross table in VA.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm getting done is the following:&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;pass parameters through the URL link and use them to pre-filter a table in job1&lt;/LI&gt;
&lt;LI&gt;prompts, execute job2 by using the (hard-coded) table from the prior job to create a form letting the user choose a root cause for failure, select an alternative root cause and submit the job&lt;/LI&gt;
&lt;LI&gt;do something code-wise with the parameters from the prompts' selection&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the missing link is to execute the job1 prior to the job2. Both jobs work independently but not in a sequential manner. I need the first job to pre-filter the table according to the selected row from VA from where I call the job via URL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I do not succeed in doing so I have 2 alternatives:&lt;/P&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;to call 2 jobs from VA, each for 1 job&lt;/LI&gt;
&lt;LI&gt;or to build the prompt upon the unfiltered table requiring the report user to mimic the filters from the selected row therefore overloading the prompts.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I've opened a related post explaining the desired approach.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/job-exceution-Waiting-for-a-job-to-finish-before-launching/td-p/971210" target="_self"&gt;https://communities.sas.com/t5/SAS-Programming/job-exceution-Waiting-for-a-job-to-finish-before-launching/td-p/971210&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 12:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971471#M377343</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-07-25T12:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971476#M377344</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure I fully understand why you can't use a DDC object. If you want, you can define a job URL in the DDC object and it will allow you to use JavaScript in your HTML form to retrieve the values passed by the VA report to the DDC object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides that, I think the solution to your problem can be the job chaining macros described &lt;A href="https://go.documentation.sas.com/doc/en/jobexeccdc/v_004/jobexecug/p156d31f0trw0mn13venyxhwl8wz.htm" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have questions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xavier&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 13:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971476#M377344</guid>
      <dc:creator>XavierBizoux</dc:creator>
      <dc:date>2025-07-25T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971480#M377345</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114048"&gt;@XavierBizoux&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's been confusing what I've said about DDC. I cannot use so far util.js and those helper files that come along with many of your provided solutions combining jobs and DDC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can use the DDC object with the URL to the job, but as pop-ups are forbidden and I'm not sure if I can allow by my own, I do not come across the submit command of the prompt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My best attempt was just about chaining the jobs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the second job with the prompt is not displayed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I had stated before, the first job executes well leaving a filtered table which populates the prompts inputs. Both jobs work well in an isolated way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the chaining fails because I cannot manage to trigger the second job with the prompts being displayed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the query_value line I've tried adding "_action"="form, prompts, execute" but nothing works for me.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*  Execute the second job;

%let QUERY_VALUE=FORM('_program'='/folder/ok/proc1/shutdown/jobs/test sequential run v2' 'make'="&amp;amp;make" 'type'="&amp;amp;type");

*;
*  The macro waits for the job to finish execution because _action=background is not
*  specified.  
*;

%jobexec_run(baseurl=&amp;amp;SERVICESBASEURL,
             in=&amp;amp;QUERY_VALUE,
             jobid_varname=J2JOBID)

%if (&amp;amp;_JOBRUN_RC eq 0) %then %do;
  %put NOTE: You can view the job execution object at /jobExecution/jobs/&amp;amp;J2JOBID;
  %put NOTE: You can view the job output at /SASJobExecution/?_jobexec=/jobExecution/jobs/&amp;amp;J2JOBID;
%end;
%else %do;
  %put ERROR: Problem running the job. &amp;amp;=_JOBRUN_RC  &amp;amp;=_STATUS_MESSAGE;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 15:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971480#M377345</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2025-07-25T15:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use parameters from VA calling a job via URL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971638#M377373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127222"&gt;@acordes&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The util.js files are there to help building web pages. They are not mandatory to building web pages in the DDC object. You can use the JavaScript in this &lt;A href="https://go.documentation.sas.com/doc/en/vacdc/v_030/varef/n109mqtyl6quiun1mwfgtcn2s68b.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&amp;nbsp;to populate prompts of the first job with information from the VA report. You can then submit the first job and stay on the same page as described in this &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-display-results-from-a-SAS-Viya-Job-in-the-same-page/ta-p/908154" target="_blank" rel="noopener"&gt;article&lt;/A&gt;. In your case, you will display the result but take specific actions using JavaScript when the first job ends execution. You can then populate other prompts based on the results from the first job. As soon as the prompts are populated, you can then execute the second job.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that situation, you don't use iFrames and you should not need to adapt the security on the platform.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can most probably try to write an article around this topic in the future but it will not be before Septembre/October timeframe.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if that would help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Xavier&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jul 2025 14:54:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-parameters-from-VA-calling-a-job-via-URL/m-p/971638#M377373</guid>
      <dc:creator>XavierBizoux</dc:creator>
      <dc:date>2025-07-29T14:54:10Z</dc:date>
    </item>
  </channel>
</rss>

