I'm trying to execute the following sample in VA, but i'm receiving the error: ERROR: File is in use, _WEBOUT . I've tried SAS suggestions but it didn't work, someone has another tip?
The Code:
/* **************************************************************************************
* Description: This stored process creates an html form that then calls a Target stored process
*
* Inputs: Two parameters are created from the sashelp.class table: Make and Type
*
* Outputs: The submist button call the stored process defined in _program
*
* NOTE: You must change the path of the target stored process if the target stored
* process is located in a different location in the SAS Management Console
*
**************************************************************************************** */
data _null_;
file _webout;
put '<HEAD><TITLE>HTML Form Example Using Streaming Output</TITLE></HEAD>';
put '<FONT face=Arial size=2 COLOR="#000000"> <B>HTML Form Example Using Streaming Output</B></FONT>';
put '<BR><BR>';
put '<FORM action="/SASStoredProcess/do">';
put '<INPUT name="_program" type=hidden value="/Shared Data/Stored Processes/Target(StoredProcess)">';
put '<INPUT name=_debug type=hidden value=0>';
run;
/* ************************************************* */
/* Get a list of car MAKES to populate the list with */
/* ************************************************* */
data _null_;
file _webout;
put '<font face=verdana size=-2> Select Car Make:</FONT>';
put '<SELECT NAME=Make SIZE=1 style="font:10pt arial">';
run;
/* create a unique list of car makes */
proc sort data = sashelp.cars out=work.cars (keep=make) nodupkey;
by make;
run;
data _null_;
file _webout;
length str $200;
set work.cars;
if _n_=1 then str='<OPTION selected value='||strip(make)||'>'||strip(make)||'</OPTION>';
else str='<OPTION value='||strip(make)||'>'||strip(make)||'</OPTION>';
put str;
run;
/* ************************************************* */
/* Get a list of car TYPES to populate the list with */
/* ************************************************* */
data _null_;
file _webout;
put '</Select><br><br>';
put '<font face=verdana size=-2> Select Car Type:</FONT>';
put '<SELECT NAME=type SIZE=1 style="font:10pt arial">';
run;
/* create a unique list of car makes */
proc sort data = sashelp.cars out=work.cars (keep=type) nodupkey;
by type;
run;
data _null_;
file _webout;
length str $200;
set work.cars;
if _n_=1 then str='<OPTION selected value='||strip(type)||'>'||strip(type)||'</OPTION>';
else str='<OPTION value='||strip(type)||'>'||strip(type)||'</OPTION>';
put str;
run;
data _null_;
file _webout;
put '</select><br><br>';
put ' <INPUT name=B1 type=submit value=Submit> ';
put '<INPUT name=B2 type=reset value=Reset>';
put '</FORM>';
put '<BR><BR>';
run;
Hi!
You need to disable the automatic macros "%STPBEGIN" and "%STPEND" when you use file _webout.
//Fredrik
Hi!
You need to disable the automatic macros "%STPBEGIN" and "%STPEND" when you use file _webout.
//Fredrik
Do you know where is the option to perform this operation? in the "summary" tab when I select "show full sas code" option, there is no way to edit the prompt.
Edit: I found the option it is in the "SAS Code" tab, then press the button "Include code for" and disable the "Stored process macros".
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: