Dear all,
Thanks for u r help in my previous post.when stored process is executing for lomg time i am trying to write a statement to webout like "please wait" using proc template.
[pre]
proc template;
define style styles.oag2;
parent = styles.default;
style StartUpFunction from StartUpFunction /
tagattr = "PleaseWait()";
style Body from Body / prehtml = '<div id="hidepage"
style="position:absolute; height:100%;width:100%;">
<br /><br /><br /><br /><br /> <center>
<b><font face="Arial" color="#000099" size="3">
Your Request is Being Processed, Please Wait . . .
</font></b> <br /><br />
</center> </div>';
end;
run;
ods html body = _webout
style = oag2
headtext = "<script> function PleaseWait()
{if (document.getElementById)
{document.getElementById('hidepage').style.visibility='hidden' } } </script>";
[/pre]
I am trying to generate output in excel format,so when i combine both the code ,its giving me an error as FILE IS IN USE _WEBOUT....
i even checked on support.sas.com ,but still i am unable to resolve ,can you please run the below code and guide me where i am doing wrong....
[pre]
/* %* Set a macro variable that will be used in the title;*/
proc template;
define style styles.oag2;
parent = styles.default;
style StartUpFunction from StartUpFunction /
tagattr = "PleaseWait()";
style Body from Body / prehtml = '<div id="hidepage"
style="position:absolute; height:100%;width:100%;">
<br /><br /><br /><br /><br /> <center>
<b><font face="Arial" color="#000099" size="3">
Your Request is Being Processed, Please Wait . . .
</font></b> <br /><br />
</center> </div>';
end;
run;
ods html body = _webout
style = oag2
headtext = "<script> function PleaseWait()
{if (document.getElementById)
{document.getElementById('hidepage').style.visibility='hidden' } } </script>";
%macro test;
%* Special processing for downloading to Microsoft Excel or Word;
%let OUTPUT_FORMAT = &_ODSDEST;
%if (%upcase(&_ODSDEST) eq HTML2EXCEL) %then %do;
%let _ODSDEST = tagsets.MSOffice2K;
%let OUTPUT_FORMAT = HTML;
%let OLD_HEADER =
%sysfunc(stpsrv_header(Content-type,application/vnd.ms-excel));
%end;
%else %if (%upcase(&_ODSDEST) eq HTML2WORD) %then %do;
%let _ODSDEST = tagsets.MSOffice2K;
%let OUTPUT_FORMAT = HTML;
%let OLD_HEADER =
%sysfunc(stpsrv_header(Content-type,application/msword));
%end;
%else %if (%upcase(&_ODSDEST) eq CHTML) %then
%let OUTPUT_FORMAT = Compact HTML;
%else %if (%upcase(&_ODSDEST) eq PHTML) %then
%let OUTPUT_FORMAT = Plain HTML;
%if (%qcmpres(&OUTPUT_FORMAT) eq )
%then %let OUTPUT_FORMAT=&_ODSDEST;
%stpbegin;
DATA TEST;
X=5;
DO I= 1 TO 10000;
Z=X*I;
OUTPUT;
END;
RUN;
PROC PRINT;
RUN;
%stpend;
%mend test;
%test;
[/pre]
Please help out.