Your SAS programs, embedded in web apps and elsewhere

Disable the Default Screen of Parameter While calling the SAS STP

Reply
Senior User
Posts: 1

Disable the Default Screen of Parameter While calling the SAS STP

Code :

 

%global _step
_inhouse_type
_CCR_UPLOAD_FILE
_securization_file
_asset_recon_file
_inhouse_file
_print_sample
_print_report
_insert2system
m_where _numrowexcel;

%let _STP_HOST_URL_ = %str(http://sasva.demo.sas.com/);
%let stp_path= %str(http://&_STP_HOST_URL_./SASStoredProcess/do);

%macro ccr_upload_stp_call ;

%if &_step eq %str(process) /*and &ccr_tab_chk=0 */ %then %do;

/*Import Excel*/


DATA _null_;
file _webout;
put "<div id=""Screen_II"" class=""w3-container city"">";
run;

DATA _null_;
file _webout;
put "<h2>Screen_II &_step.</h2>";
put "</div>";
run;
%end ;

%else %do;

/*Upload Excel Screen*/

DATA _null_;
file _webout;
put "<form action='' method='post' enctype='multipart/form-data' >";

put "<input type='hidden' name='_program' value=""&stp_path"">";
put "<input type=""hidden"" name=""_step"" value=""process"">";
/*put "<input type=""hidden"" name=""_debug"" value="""">";*/

put "<meta name=""viewport"" content=""width=device-width, initial-scale=1""> ";
put "<link rel=""stylesheet"" href=""http://www.w3schools.com/lib/w3.css"">";
put "<body> <ul class=""w3-navbar w3-black"">";
put " <li><a href=""#"" onclick=""openScreen('Screen_I')"">Deal Form</a></li>";
put " <li><a href=""http://sasva.demo.sas.com/SASStoredProcess/do?_action=form,execute&_program=%2FUser+Folders%2Fsasdem..."" onclick=""openScreen('Screen_II')"">SAS Output</a></li>"
;
put "</ul>";

put "<div id=""Screen_I"" class=""w3-container city"">";
put "<table border=""0"" cellpadding=""5"">";
put "<tr>";
put "<td class=""l Data"">Choose a file to upload :</td>";
put "<td class=""l Data""><input type=""file"" name=""_UPLOAD_FILE""></td>";
put "</tr>";
put "<tr>";
put "<td class=""l Data"" colspan=""2"" align=""left""><input type=""submit"" value=""OK"" onclick=""openScreen('Screen_II')""></td>";
put " </tr>";
put "</table>";
put "</div>";
run;
%end;

%mend ccr_upload_stp_call;

%ccr_upload_stp_call;

data _null_;
file _webout;
put "<script>";
put "openScreen(""Screen_I"")";
put "function openScreen(cityName) {";
put " var i;";
put " var x = document.getElementsByClassName(""city"");";
put " for (i = 0; i < x.length; i++) {";
put " x[i].style.display = ""none"";";
put " }";
put " document.getElementById(cityName).style.display = ""block"";";
put "}";
put "</script>";

put "</body>";
put "</html>";
run;

 

we have one upload screen.that is screen_I, after uploading the File it directly move to screen _II Tab - where the improt part will process.

 

while moving to screen_II,it showing  me the Default Parameters Screen which i have attached for your reference.

 

Can we disable this default parameter Screen in sas stp?


2.jpg
Ask a Question
Discussion stats
  • 0 replies
  • 174 views
  • 0 likes
  • 1 in conversation