BookmarkSubscribeRSS Feed
IceLemonTea
Calcite | Level 5

Hello SAS Expert,

 

I have here SAS Stored Process that upload files to the server that can be accessed in the SAS Delivery Portal. However on my first attempt on the page was redirecting to SAS Stored Process Web Application site.

Was this a bug in the SAS Portal?

 

data _null_;
file _webout;
put
'
<html>
<body>
<form action="/SASStoredProcess/do?_program=/CMS Portal/STP/upload_excel_common_HOME_FIBRE" method="post" enctype="multipart/form-data">
<input type="hidden" name="_program" value="/Path/StoredProcessName/">
<input type="hidden" name="SERVER_PATH" value="/sasdata/cmsuser/cpfiles_homefibre/">
<table border="0" cellpadding="2">
<tr>
<th align="right">(Home Fibre) Choose a file to upload:</th>
<td><input type="file" name="myfile" size="100"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="OK"></td>
</tr>
<tr><td colspan="2" align="left"></td></tr>
<tr><td colspan="2" align="left"><b>Recommended File Name as per below:</b></td></tr>
<tr><td colspan="2" align="left">SO1_HOME_FIBRE_CONTROL_PANEL.xlsx</td></tr>
<tr><td colspan="2" align="left"></td></tr>
<tr><td colspan="2" align="left"<b>Notes:</b></td></tr>
<tr><td colspan="2" align="left">1) Contents must contains header.</td></tr>
<tr><td colspan="2" align="left">2) File name cannot contains space.</td></tr>
<tr><td colspan="2" align="left">3) Same file name in same category uploaded will be overwritten.</td></tr>
</table>
</form>
</body></html>';

%if "&_IS_EXT_ERROR" ne "-1" %then %do;
put "&error_msg1";
%end;

%else %if "&_WEBIN_FILENAME" ne "-1" and "&error_msg" eq "-1" %then %do;
put "File uploaded: &CPFile";
%end;

%else %if "&_WEBIN_FILENAME" eq "1" and "&error_msg" ne "-1" %then %do;
put "&error_msg";
%end;

run;

 

Upon submitting on my first attempt, the page was redirected to this site. Then when I tried again the stored process working fine.

 

IceLemonTea_0-1648799842339.png

 

1 REPLY 1
Sam2022
Obsidian | Level 7

Hi,

 

if you click on "List Available Stored Processes and Reports" you will find your STP. I think you should put the url of that STP to you report. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 323 views
  • 0 likes
  • 2 in conversation