<?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: SAS access in HTML in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/873637#M345196</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&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;Here is how I was able to get this running in our Viya 3.5 now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Created a new Job Definition called '&lt;SPAN&gt;&lt;STRONG&gt;getDsColValues'&lt;/STRONG&gt;&lt;/SPAN&gt; with &lt;STRONG&gt;'No embedded form'&lt;/STRONG&gt;, that accepts two custom parameters (s_dsName, s_colName) and returns a unique list of values in JSON format.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;The Job was saved under the Public Folder (&lt;SPAN&gt;&lt;STRONG&gt;/Public/getDsColValues&lt;/STRONG&gt;).&lt;/SPAN&gt;&lt;SPAN&gt; Here is it's SAS code.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Generate unique list of values */
Proc summary data=&amp;amp;s_dsName NWAY missing;
	class &amp;amp;s_colName;
	output out=work._unique(drop=_type_);
run;
proc json out=_webout pretty nosastags;
	export work._unique;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Created Job Definition called '&lt;SPAN&gt;&lt;STRONG&gt;DsDrivenLists&lt;/STRONG&gt;', with HTML from, and saved it under the Public folder (/Public/DsDrivenLists). Here is the HTML form Code, which was inspired by this example&amp;nbsp;&lt;A href="https://github.com/sassoftware/sas-viya-programming/tree/master/communities/SAS/JES_selectOutputFormat" target="_blank" rel="noopener"&gt;sas-viya-programming/communities/SAS/JES_selectOutputFormat at master · sassoftware/sas-viya-programming · GitHub&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;&amp;lt;html&amp;gt;
   &amp;lt;head&amp;gt;
      &amp;lt;link rel="stylesheet" href="/SASJobExecution/theme"&amp;gt;
   &amp;lt;/head&amp;gt;
   &amp;lt;body&amp;gt;
      &amp;lt;h1 class="jobexec_sample_name"&amp;gt;Creating JES Prompts and Output Using SAS Data sets&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;
         The prompts below contains items pulled dynamically from SAS data sets. 
         &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
         To view data set records, make a seletion and press 'submit'
      &amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;
      &amp;lt;form action="javascript&amp;amp;colon;submitForm();"&amp;gt;
         &amp;lt;!-- Define Dropdown/Select place holders --&amp;gt;
         &amp;lt;div id="yearList"&amp;gt;&amp;lt;/div&amp;gt;
         &amp;lt;/nbsp&amp;gt;
         &amp;lt;div id="stateList"&amp;gt;&amp;lt;/div&amp;gt;
         &amp;lt;/nbsp&amp;gt;
         &amp;lt;/nbsp&amp;gt;
         &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;
         &amp;lt;input type="submit"&amp;gt;
      &amp;lt;/form&amp;gt;
      &amp;lt;center&amp;gt;
         &amp;lt;div id="JobResults"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;/center&amp;gt;
   &amp;lt;/body&amp;gt;
   &amp;lt;script&amp;gt;
		
		// CREATE AN XMLHttpRequest OBJECT, WITH POST METHOD.
		var formData = new FormData();
		// This is my SAS Job that returns JSON Objects Array of unique values list from a SAS Data set.
		formData.append("_program", "/Public/getDsColValues");  
		formData.append("_action", "execute");
		formData.append('_csrf', "$CSRF$");
		formData.append('s_dsName', "sashelp.prdsal2"); // SAS Data set specified for the s_dsName parameter
		formData.append('s_colName', "year"); // Year column specified for the s_colName parameter
		formData.append("_output_type", "json");

        // Declare Ajax request object for the YearList
        var xhr = new XMLHttpRequest();
		xhr.addEventListener("error", function (event) {
			alert("Something went wrong.");
		});
        xhr.onreadystatechange = function () {
			if (this.readyState == 4) {
				if (this.status == 200) {
					// Pass Parsed JSON DATA, and other info to the custom function
					createSelection(JSON.parse(this.responseText),'year','YEAR',1);
				}
	            else {
			    	document.getElementById("yearList").innerHTML = "Status: " + this.status;
				}
			}
        };

		// Declare Ajax request object for the StateList
        var xhr2 = new XMLHttpRequest(); 
		xhr2.addEventListener("error", function (event) {
			alert("Something went wrong.");
		});
        xhr2.onreadystatechange = function () {
			if (this.readyState == 4) {
				if (this.status == 200) {
					// Pass Parsed JSON DATA, and other info
					createSelection(JSON.parse(this.responseText),'state','STATE',5);
	            }
			    else {
			    	document.getElementById("stateList").innerHTML = "Status: " + this.status;
				}
			}

        };
		
        // Submit the request and get Year data elements from SAS data set
		xhr.open("post", "/SASJobExecution/");
		xhr.send(formData);

		// Submit the request and get State data elements from SAS data set
		xhr2.open("post", "/SASJobExecution/");
		formData.set('s_colName', "state"); // Reuse the same formData object, but just change the value of the s_colName parameter
		xhr2.send(formData);

		// Display a temporary message in the DIV
		document.getElementById("yearList").innerHTML = "Please wait ... ";
		document.getElementById("stateList").innerHTML = "Please wait ... ";

		//Declare a Function to convert JSON response into a Dropdown selection widget
		function createSelection(rList,prefix,name,size = 1) {
		  var listName = prefix + 'List';
		  var prompt = '&amp;lt;select name="' + prefix + 'Select" size="' + size + '"&amp;gt;';
		  var i;
		  //alert(JSON.stringify(rList));

		  for(i = 0; i &amp;lt; rList.length; i++) {
			  prompt += '&amp;lt;OPTION VALUE="' + rList[i][name] + '"&amp;gt;' + rList[i][name] + ' :' + rList[i]._FREQ_ + '&amp;lt;/option&amp;gt;';
		  }
		  prompt += '&amp;lt;/select&amp;gt;'
		  document.getElementById(listName).innerHTML = prompt;
		}

		function submitForm() {
			var formData = new FormData();
			formData.append("yearParm", document.querySelector('[name="yearSelect"]').value);
			formData.append("stateParm", document.querySelector('[name="stateSelect"]').value);
			formData.append("_program", "$PROGRAM$");
			formData.append("_action", "execute");
			formData.append('_csrf', "$CSRF$");

			var request = new XMLHttpRequest();
			request.addEventListener("error", function (event) {
				alert("Something went wrong.");
			});
			request.onreadystatechange = function () {
				if (this.readyState == 4) {
					if (this.status == 200) {
						document.getElementById("JobResults").innerHTML = this.responseText;
					}
					else {
						document.getElementById("JobResults").innerHTML = "Status: " + this.status;
					}
				}
			};
			request.open("post", "/SASJobExecution/");
			request.send(formData);
		  
			// Display a temporary message in the DIV
			document.getElementById("JobResults").innerHTML = "Please wait ... ";
		}
   &amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I stopped here once I was able to populate my HTML Select/DropDown widgets from SAS, after all, this is just Prove of Concept&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this gets your closer to your goal.&lt;/P&gt;
&lt;P&gt;But I'll just repeat my advice again, for SAS Viya 3.5 stick with the TASK Prompts, out of the box, they are probably a lot more feature rich compared to what you would spend time to build using JavaScript/HTML/CSS combination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Ahmed&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 14:01:59 GMT</pubDate>
    <dc:creator>AhmedAl_Attar</dc:creator>
    <dc:date>2023-05-03T14:01:59Z</dc:date>
    <item>
      <title>SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870849#M343996</link>
      <description>Is there any example or reference to the documents to access SAS datasets in HTML and CSS coding to fetch and display the value from SAS dataset to the prompts in web page?</description>
      <pubDate>Thu, 20 Apr 2023 17:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870849#M343996</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-20T17:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870854#M343999</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;Need more info in order to help you out&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Do you have SAS Server deployment to access or just bunch of SAS data set?&lt;/LI&gt;
&lt;LI&gt;Do you have a Web Application that needs to display the Prompt values, or this is a Static HTML page?&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;This kind of information is important in order to properly guide/assist you&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870854#M343999</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-20T18:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870855#M344000</link>
      <description>I'm building the static HTML web page. I have a bunch of SAS datasets.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870855#M344000</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-20T18:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870857#M344001</link>
      <description>&lt;P&gt;Do you have a BI server, enabling you to use stored processes through a web interface, or do you just have a third-party web server, from which you could call SAS in batch mode?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:37:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870857#M344001</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-20T18:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870859#M344003</link>
      <description>&lt;P&gt;If you want to generate a static HTML file from a SAS dataset then just use a data step and the PUT statement.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870859#M344003</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-04-20T18:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870860#M344004</link>
      <description>Currently I use SAS job execution server&lt;BR /&gt; and SAS Viya.&lt;BR /&gt;&lt;BR /&gt;Not sure if this answers your question but this is what I know.&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870860#M344004</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-20T18:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870861#M344005</link>
      <description>I think that you have misunderstood my question.&lt;BR /&gt;&lt;BR /&gt;I'm writing the HTML code at the moment which will create static web page.&lt;BR /&gt;&lt;BR /&gt;Few of the prompts (dropdown) depends on values from the SAS datasets and I&lt;BR /&gt;couldn't hard code it in my HTML code as there are numerous values.&lt;BR /&gt;&lt;BR /&gt;How to access SAS datasets in HTML to receive values from SAS datasets?&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Apr 2023 18:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870861#M344005</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-20T18:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870862#M344006</link>
      <description>&lt;P&gt;See this paper as a starting point. &lt;BR /&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings20/4260-2020.pdf" target="_blank" rel="noopener"&gt;https://support.sas.com/resources/papers/proceedings20/4260-2020.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Video&amp;nbsp;@ bottom of page&lt;/P&gt;
&lt;P&gt;&lt;A href="https://sasjs.io/" target="_blank"&gt;https://sasjs.io/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 19:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870862#M344006</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-04-20T19:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870863#M344007</link>
      <description>&lt;P&gt;Instead of writing the HTML code, write SAS code which creates the HTML code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename htmlfile "path/to/your/file.html";

data _null_;
file htmlfile;
set sashelp.class end=done;
if _n_ = 1
then do;
  put '&amp;lt;html&amp;gt;';
  put '&amp;lt;head&amp;gt;';
  /* put additional header lines, as needed */
  put '&amp;lt;/head&amp;gt;';
  put '&amp;lt;body&amp;gt;';
  put '&amp;lt;table&amp;gt;';
  put '&amp;lt;thead&amp;gt;';
  put '&amp;lt;tr&amp;gt;';
  put '&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;';
  put '&amp;lt;/tr&amp;gt;';
  put '&amp;lt;/thead&amp;gt;';
  put '&amp;lt;tbody&amp;gt;';
end;
put '&amp;lt;tr&amp;gt;';
put '&amp;lt;td&amp;gt;' name '&amp;lt;/td&amp;gt;';
put '&amp;lt;/tr&amp;gt;';
if done
then do;
  put '&amp;lt;/tbody&amp;gt;';
  put '&amp;lt;/table&amp;gt;';
  put '&amp;lt;/body&amp;gt;';
  put '&amp;lt;/html&amp;gt;';
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2023 19:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870863#M344007</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-20T19:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870880#M344018</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;PS: You would have saved us time and efforts if you had stated you have SAS Viya from the beginning&lt;/P&gt;
&lt;P&gt;Look at this article&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Create-a-SAS-Viya-Job-with-a-prompt-using-Task-Prompts/ta-p/658639" target="_blank"&gt;Create a SAS Viya Job with a prompt using Task Prompts&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 20:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/870880#M344018</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-20T20:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871030#M344049</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp; Good idea. Unfortunately, it's not helping me either. I executed your code just by chnaging the path and dataset name and all I got is below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There were two observations and 2 variables in my dataset. Should I need to update the HTML code apart from path nad dataset name? Whether this HTML code tells how it is connected to SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;thead&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;Name&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/thead&amp;gt;
&amp;lt;tbody&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;. &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;. &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Apr 2023 07:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871030#M344049</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-21T07:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871032#M344050</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13868"&gt;@AhmedAl_Attar&lt;/a&gt;&amp;nbsp;Thanks for the reference document. However I could not see that the provided link has reference to built HTML webpage using SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 07:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871032#M344050</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-21T07:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871034#M344051</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;Any other references? Provided link is to build HTML app but I want to build the webpage using HTML code.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 07:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871034#M344051</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-21T07:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871045#M344061</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;Webpage which I developing using HTML code has many prompts in which few prompts are supposed to take values from SAS datasets.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once I identified (with the help our community) the solution to access SAS tables in HTML, I want to incorporate it in my HTML code. I'm using SAS Viya to execute the SAS programs&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 08:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871045#M344061</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-21T08:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871046#M344062</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;Have a look at this article&amp;nbsp;&lt;A title="Create a SAS Viya Job with a prompt using HTML Prompts" href="https://communities.sas.com/t5/SAS-Communities-Library/Create-a-SAS-Viya-Job-with-a-prompt-using-HTML-Prompts/ta-p/805091" target="_blank" rel="noopener"&gt;Create a SAS Viya Job with a prompt using HTML Prompts&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 09:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871046#M344062</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2023-04-21T09:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871164#M344111</link>
      <description>You need to create the whole page in your SAS program, and use the method I showed to populate the prompt selection in the HTML form, instead of populating a table object.</description>
      <pubDate>Fri, 21 Apr 2023 15:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871164#M344111</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-21T15:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871291#M344158</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13868"&gt;@AhmedAl_Attar&lt;/a&gt;&amp;nbsp;Article which you shared is really helpful. However I'd like to give the little backgroud where I need the help. We already have prompts in SAS Viya Job execution. In order to improve the performance and for better UI I was asked to create the standalone webpage using HTML and CSS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote the HTML code for the prompts where the drop down values are not dependent on the SAS datasets. For few prompts we have numerous values and it is fetching values from SAS datasets. Now I need some help to tackle this scenario?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 08:46:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871291#M344158</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-22T08:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871299#M344162</link>
      <description>&lt;P&gt;Write the HTML code manually first, then look how you can populate it from the dataset. To get help, show the manually written HTML, and post the dataset as a data step with datalines, both in code boxes.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 09:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871299#M344162</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-22T09:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871302#M344164</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;I don't know how to populate the SAS datsaet values in HTML code, hence this post. Hopefully someone of you can help me to move forward. Here is the code snippet of my HTML code which I wrote manually. Please ignore the silly errors as this is only a snippet for you to undertand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
  function show_div() {
    document.getElementById('_division_lbl').hidden = false;
    document.getElementById('_division_sel').hidden = false;
  }
  function show_tts() {
    document.getElementById('_dentype_lbl').hidden = false;
    document.getElementById('_dentype_sel').hidden = false;
  }
&amp;lt;/script&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;SAS Job&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="css/library.css"&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body role="main" class="jobexec_body"&amp;gt;
    &amp;lt;script src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;div class="jobexec_header"&amp;gt;Management System&amp;lt;/div&amp;gt;
    &amp;lt;form class="jobexec_form" action="/SASJobExecution/" target="_tab"&amp;gt;
      &amp;lt;input type="hidden" name="_program" value="$PROGRAM$"/&amp;gt;
      &amp;lt;input type="hidden" name="_action" value="execute"/&amp;gt;
      &amp;lt;input type="hidden" name="_output_type" value="ods_html5"/&amp;gt;
      &amp;lt;div class="jobexec_header_2"&amp;gt;SAS&amp;lt;sup&amp;gt;®&amp;lt;/sup&amp;gt; Job Execution&amp;lt;/div&amp;gt;
      &amp;lt;br /&amp;gt;
        &amp;lt;div class="divTableHeading"&amp;gt;
          &amp;lt;div class="divTableBody"&amp;gt;
            &amp;lt;div class="divTableRow"&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;&amp;lt;label for="_rawdata"&amp;gt;Raw Data Required:&amp;lt;span class="required-field"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/div&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;&amp;lt;label for="_demgroup"&amp;gt;Group:&amp;lt;/label&amp;gt;&amp;lt;/div&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;&amp;lt;label for="_division_sel" id="_division_lbl" hidden&amp;gt;Division:&amp;lt;span class="required-field"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/div&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;&amp;lt;label for="_dentype_sel" id="_dentype_lbl" hidden&amp;gt;Type:&amp;lt;span class="required-field"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/label&amp;gt;&amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="divTableBody"&amp;gt;
            &amp;lt;div class="divTableRow"&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;
                &amp;lt;select name="_rawdata" id="_rawdata" class="jobexec_select"&amp;gt;
                  &amp;lt;option value="yes" selected&amp;gt;Yes&amp;lt;/option&amp;gt;
                  &amp;lt;option value="no"&amp;gt;No&amp;lt;/option&amp;gt;
                &amp;lt;/select&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;
                &amp;lt;select name="_demgroup" id="_demgroup" class="jobexec_select" onchange="show_div()"&amp;gt;
                  &amp;lt;option value="crm" selected&amp;gt;CRM&amp;lt;/option&amp;gt;
                  &amp;lt;option value="tts"&amp;gt;Sales&amp;lt;/option&amp;gt;
                &amp;lt;/select&amp;gt;
              &amp;lt;/div&amp;gt; 
              &amp;lt;div class="divTableCell"&amp;gt;
                &amp;lt;select name="_division" id="_division_sel" class="jobexec_select" onchange="show_tts()" multiple hidden&amp;gt;
                  &amp;lt;option value="ep"&amp;gt;sample1&amp;lt;/option&amp;gt;
                  &amp;lt;option value="es"&amp;gt;sample2&amp;lt;/option&amp;gt;
                  &amp;lt;option value="ic"&amp;gt;sample3&amp;lt;/option&amp;gt;                  
                &amp;lt;/select&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div class="divTableCell"&amp;gt;
                &amp;lt;select name="_dentype_sel" id="_dentype_sel" class="jobexec_select" hidden&amp;gt;
                  &amp;lt;option value="tts" selected&amp;gt;Sales&amp;lt;/option&amp;gt;
                &amp;lt;/select&amp;gt;
              &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;br /&amp;gt;	  
    &amp;lt;label for="_odsstyle" &amp;gt;ODS style:&amp;lt;/label&amp;gt;
    &amp;lt;select name="_odsstyle" id="_odsstyle" class="jobexec_select"&amp;gt;
      [More values here]
      &amp;lt;option value="HTMLBlue" selected&amp;gt;HTMLBlue&amp;lt;/option&amp;gt;
      [More values here]
    &amp;lt;/select&amp;gt;
  
  &amp;lt;!--&amp;lt;input type="checkbox" name="blanks" id="blanks" value="ExcludeBlanks"
    class="jobexec_input_checkbox"/&amp;gt;
  &amp;lt;label for="blanks"&amp;gt;Exclude blank macro variables from the report.&amp;lt;/label&amp;gt;--&amp;gt;  
      &amp;lt;br/&amp;gt;
      &amp;lt;hr size="1"/&amp;gt;
      &amp;lt;input type="submit" value="Run Job" class="jobexec_input_submit"/&amp;gt;
      &amp;lt;input type="checkbox" name="_debug" id="_debug" value="log" 
        class="jobexec_input_checkbox"/&amp;gt;
      &amp;lt;label for="_debug"&amp;gt;Show SAS Log&amp;lt;/label&amp;gt;
    &amp;lt;/form&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Now assume I want to introduce some prompts (e.g. product, model) in this HTML code which takes values from SAS dataset, then how to do this?&amp;nbsp; My dataset looks like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I choose one product from the 'product' prompt, then corresponding model number should display in next prompt, 'model'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="138"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="74"&gt;Product&lt;/TD&gt;
&lt;TD width="64"&gt;Model&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Electronics&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Electronics&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Electronics&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Electrical&lt;/TD&gt;
&lt;TD&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Electrical&lt;/TD&gt;
&lt;TD&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Medical&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Medical&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. I'm sorry for not sending the datastep with datalines and it is due to weekend SAS outage for license renewal.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 09:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871302#M344164</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2023-04-22T09:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS access in HTML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871303#M344165</link>
      <description>&lt;P&gt;So how would the "Product" selection look in your HTML when you write it yourself?&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 09:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-access-in-HTML/m-p/871303#M344165</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-22T09:53:29Z</dc:date>
    </item>
  </channel>
</rss>

