I've been working on a custom input for that feeds my stored process and recently I added the ability to upload a file. As a result, my previous approach that used the _username and _password parameters seems to be broken. http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003259930.htm
Here's a brief history of what I have done and where I am stuck.
(I can post more code, but hopefully someone can see what I am missing with these snippets)
Version 1 - custom input form that sends parameters through the URL
<FORM name="form" id="form" METHOD="GET" ACTION="&_URL">
<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">
<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">
This works, but since some of my text boxes are large, I'd prefer not to use GET.
Version 2 - custom input form that sends parameters via POST
<FORM name="form" id="form" METHOD="POST" ACTION="&_URL">
<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">
<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">
This works, but recently I was asked to add the ability to upload files. As a result, I needed to change the form enctype value.
http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003254547.htm
Version 3 - custom input form that sends parameters and files via POST
<FORM name="form" id="form" METHOD="POST" ACTION="&_URL" enctype="multipart/form-data">
<INPUT TYPE="HIDDEN" id="usernm" NAME="_username" VALUE="">
<INPUT TYPE="HIDDEN" id="pass" NAME="_password" VALUE="">
<INPUT type="file" id="myfile" NAME="myfile">
After executing this, the form submit takes me to the SAS Logon Manager, which I am trying to avoid by using _username and _password. My password is encoded (I have
AllowEncodedPassword is set to true).
Does anyone know what's going on with POST when the enctype is "multipart/form-data?
Thanks.
Have you tried using Basic Aunthication (/do1) with Version 3?
Vince DelGobbo
SAS R&D
Yes, that did not fix the issue. I have a ticket open with SAS. I was able to code a work around by splitting it into two stored processes, but that's an necessary step, so I'm hopeful that SAS can resolve my ticket.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.