Hi,
I have a stored process code in the following format -
*ProcessBody;
%include "/sasdev/.../sas_parms.sas";
LIBNAME TEST ORACLE PATH=&SASLIBPATH SCHEMA=&SASLIBSCHEMA USER=&SASLIBUSERID password="&SASLIBPW";
%include '/sasdev/.../excltags.sas';
%macro _createpage;
.....put statements writing javascript code
put '<form name="my_form"';
put ' method="post"';
put ' action="http://sasdev.myclient.com:8080/SASStoredProcess/do" >';
put '<input type="hidden"';
put ' name="_program"';
put ' value="//Foundation/BIP
Tree/ReportStudio/Shared/Reports/StoredProcesses/..../completion_weekly">';
.....put statements writing javascript code
%mend _createpage;
%macro output;
%let _ODSDEST=tagsets.ExcelXP;
/*%let _DEBUG=log,trace; When using this... the %let RV= statements need to be commented out which will redirect the output to a HTML window rather than MS Excel*/
%let RV=%sysfunc(stpsrv_header(Content-type, application/vnd.ms-excel));
%let RV=%sysfunc(stpsrv_header(Content-disposition, attachment;filename="Boeing_HA_Completion_Weekly.xls"));
/***************************NOW START ADDING CODE HERE ********************************/
%STPBEGIN;
ods tagsets.ExcelXP file=_webout style=sasweb options(doc="help");
ods tagsets.ExcelXP options(sheet_name='Male Students' sheet_interval='none');
proc print data=sashelp.class;
where (sex eq 'M');
run; quit;
proc print data=sashelp.class;
where (age eq 15);
run; quit;
ods tagsets.ExcelXP options(sheet_name='Female Students' sheet_interval='none');
proc print data=sashelp.class;
where (sex eq 'F');
run; quit;
proc print data=sashelp.class;
where (age eq 14);
run; quit;
ods tagsets.ExcelXP close;
%STPEND;
/***************************NOW FINISH ADDING CODE HERE ********************************/
data _null_;
file _webout;
put '<center><a href="http://sasdev.uhc.com:8080/SASStoredProcess/do?&_program=//Foundation/BIP Tree/ReportStudio/Shared/Reports/StoredProcesses/Optum/rpt/phi/shr_stp/ha_completion_weekly">
<img src="http://unitedteams.uhc.com/SCS/URN/OSSA/Pictures/SAS%20Store%20Process%20Images/Prompt.bmp" border="0" />
</a></center>';
run;
%mend output;
%macro main;
%if %symexist(refresh_submit) %then
%do;
%if &refresh_submit ne 1 %then
%do;
%create_page;
%end;
%else
%do;
%output;
%end;
%end;
%else
%do;
%create_page;
%end;
%mend;
%main;
When I run this code with the _debug=log,trace , I am getting an xml errror
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Only one top level element is allowed in an XML document. Error processing resource 'http://sasdev.uhc.com:8080/SASStoredPr...
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
-^
AN> ss:ID="systemtitle5__c" ss:Parent="systemtitle5">
<Alignment ss:WrapText="1" ss:Horizontal="Center" />
Any help would be appreciate.
Thanks,
saspert.
Hi:
I'd recommend that you work with Tech Support on this question. There is too much going on in your stored process and much of what is happening needs to be debugged and/or tested with environment and configuration specific information.
cynthia
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.