Your SAS programs, embedded in web apps and elsewhere

_WEBIN_ macro variables are not being created when attempting to upload a file using a stored process

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

_WEBIN_ macro variables are not being created when attempting to upload a file using a stored process

I am trying to use this information

http://support.sas.com/documentation/cdl/en/stpug/61271/HTML/default/viewer.htm#a003254547.htm (Example 1: Uploading a Single File) to allow a user to upload a file.  When I use the example code though, I get an error referring to the _WEBIN_ macro variables (that they are missing).  I tried printing the variables that are created and there aren't any _WEBIN_ variable, even though other macro variables I created show up.

<html>

<form action="http://MYSASSERVER/SASStoredProcess/do" method="post" enctype="multipart /form-data">

<input type="hidden" NAME="_program" value="/Stored Processes/CLB_MIS/clbo_mis_attachment">

<table border="0" cellpadding="5">

<tr>

<th>Choose a file to upload:</th>

<td><input type="file" name="myfile"></td>

</tr>

<tr>

<td colspan="2" align="center"><input type="submit" value="OK"><INPUT TYPE="CHECKBOX" NAME="_debug" VALUE="log"></td>

</tr>

</table>

</form>

</html>

I have been using this in the stored process to check for the _WEBIN macro variables.

proc sql;

  select

    scope

    , name

    , resolve(value) as value

  from

    dictionary.macros

where

    scope = "GLOBAL"

    and name like "/_WEBIN%" escape "/"

  order by

    name

  ;

quit;

Any suggestions on what to change?


Thanks.


Accepted Solutions
Solution
‎04-02-2013 04:13 PM
Occasional Contributor
Posts: 7

Re: _WEBIN_ macro variables are not being created when attempting to upload a file using a stored process

It turns out that the space after "multipart" makes a difference.  It seems several websites had a space which came over during a copy/paste.

enctype="multipart /form-data"> 

View solution in original post


All Replies
Solution
‎04-02-2013 04:13 PM
Occasional Contributor
Posts: 7

Re: _WEBIN_ macro variables are not being created when attempting to upload a file using a stored process

It turns out that the space after "multipart" makes a difference.  It seems several websites had a space which came over during a copy/paste.

enctype="multipart /form-data"> 

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 382 views
  • 0 likes
  • 1 in conversation