The SAS Output Delivery System and reporting techniques

Using Tagsets.ExcelXP (version 1.95) in EG Project

Reply
Occasional Contributor
Posts: 7

Using Tagsets.ExcelXP (version 1.95) in EG Project

I have a very simple EG project - open a data set (1 obs), filter/query and output it to a work dataset, apply the following code and am getting the errors:
"ERROR: No logical assign for filename _WEBOUT."
"Warning: No body file. TAGSETS.EXCELXP output will not be created."

In EG I have already deselected the Tools-->Options-->Results-->Stored Process of "Force Streaming to Transient" as we already do have projects that output to Excel and have created stored processes from them, the difference with this one is that I am needing to write to separate worksheets in a workbook.

I need to get past this as the next needed step is to create a stored process from the EG project...



1 The SAS System 15:12 Thursday, June 18, 2009

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET SYSLAST=WORK.FEEDUEINFO;
4 %LET _CLIENTTASKLABEL=%NRBQUOTE(Code);
5 %LET _EGTASKLABEL=%NRBQUOTE(Code);
6 %LET _CLIENTPROJECTNAME=%NRBQUOTE(P:\BizIntel\Test of Excel MultiWorksheets.egp);
7 %LET _SASPROGRAMFILE=;
8
9 ODS _ALL_ CLOSE;
NOTE: Some of your options or statements may not be supported with the Activex or Java series of devices. Graph defaults for these
drivers may be different from other SAS/GRAPH device drivers. For further information, please contact Technical Support.
10 OPTIONS DEV=ACTIVEX;
11
12 %gaccessible;
13 /* Begin code to include */
14
15
16 data _null_;
17 rc = stpsrv_header('Content-type','application/vnd.ms-excel');
18 /* Change the "temp" in the filename= below to the actual name to give the Excel spreadsheet. */
19 rc = stpsrv_header('Content-disposition','attachment; filename=FeeDueInfo.xls');
20 run;

WARNING: No logical assign for filename _WEBOUT.
WARNING: No logical assign for filename _WEBOUT.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
Memory 150k


21
22
23
24 /* print_header and print_footer - places the information in the header/footer of the Excel report */
25 /* and are viewable via Print Preview and on the actual output. */
26 /* title and footnote statements are still available to be used as well. */
27 /*
28 ods tagsets.excelxp file=_webout
29 options(sheet_interval='none'
30 sheet_name='FeeDueInfo' embedded_titles="yes" embedded_footers="yes"
31 print_header='&B&CStudent Fees Due'
32 print_footer='&B&CGenerated by BCC Business Intelligence on &D &T'
33 );
34 */
35 ods tagsets.excelxp file=_webout
36 options(sheet_interval='none'
37 sheet_name='FeeDueInfo' embedded_titles="yes" embedded_footers="yes"
38 );
NOTE: Writing TAGSETS.EXCELXP Body file: _WEBOUT
ERROR: No logical assign for filename _WEBOUT.
WARNING: No body file. TAGSETS.EXCELXP output will not be created.
39
40 /* Note that the dataset name below MUST MATCH the final dataset created in the EG Project! */
41 proc print data=work.feedueinfo noobs;
42 /* var statements with specific formatting go here. This is OPTIONAL, however if you want */
43 /* to use even one var statement, you must use one for each variable and put them in the order */
2 The SAS System 15:12 Thursday, June 18, 2009

44 /* in which they are to be displayed in the final output. */
45 * run;
46 /*
47 ods tagsets.excelxp
48 options(embedded_titles="yes" embedded_footers="yes"
49 print_header='&B&CStudent Fees Due on Drop Date'
50 print_footer='&B&CGenerated by BCC Business Intelligence on &D &T'
51 sheet_interval='none'
52 sheet_name='StdWithFeesDue');
53 */
54 ods tagsets.excelxp
55 options(embedded_titles="yes" embedded_footers="yes"
56 sheet_interval='none'
57 sheet_name='StdWithFeesDue');
WARNING: No body file. TAGSETS.EXCELXP output will not be created.
58
59
60 /* Note that the dataset name below MUST MATCH the final dataset created in the EG Project! */

WARNING: No output destinations active.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.04 seconds
user cpu time 0.01 seconds
system cpu time 0.01 seconds
Memory 36k


61 proc print data=work.feedueinfo noobs;
62 /* var statements with specific formatting go here. This is OPTIONAL, however if you want */
63 /* to use even one var statement, you must use one for each variable and put them in the order */
64 /* in which they are to be displayed in the final output. */
65 run;

WARNING: No output destinations active.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
user cpu time 0.00 seconds
system cpu time 0.01 seconds
Memory 51k


66
67 ods tagsets.excelxp close;
68
69
70 %LET _CLIENTTASKLABEL=;
71 %LET _EGTASKLABEL=;
72 %LET _CLIENTPROJECTNAME=;
73 %LET _SASPROGRAMFILE=;
74
75 ;*';*";*/;quit;run;
76 ODS _ALL_ CLOSE;
77
78
79 QUIT; RUN;
80
Occasional Contributor
Posts: 7

Re: Using Tagsets.ExcelXP (version 1.95) in EG Project

I decided to try and create the stored process anyway and was successful, however I'm still not getting multiple worksheets, but just the output from the dataset twice in one worksheet with the name being that of the last piece of code "StdWithFeesDue".
SAS Super FREQ
Posts: 8,743

Re: Using Tagsets.ExcelXP (version 1.95) in EG Project

Hi:
The use of _webout and the content-type header that you have in your data step program are techniques meant to be used with ONLY streaming output -- primarily web-based output. (EG does not produce web-based output -- at least not in the same way as the Information Delivery Portal.)

I am only aware of the ability to use TAGSETS.EXCELXP with the Information Delivery Portal -- not EG, not the SAS Add-In, not WRS. When you force streaming to transient in EG, you are telling EG that it's OK for the stored process to make a temporary package and return the package to the client app. The transient result type in EG is generally used for returning both text and graph output from a single stored process. Transient results do NOT use a content-type header or _webout. _WEBOUT is like a pipeline between a web server and the client application. Streaming results are the only type of results that usually go down that pipeline. If transient results go down that pipeline, they do not need a content-type header -- because they are already "packaged" to go to a temporary Internet cache location where the receiving client application knows how to get them.

But consider some other facts about stored processes....you could -try- to return HTML or PDF results from a stored process (for example) to PowerPoint -- but that stored process would not work because PowerPoint can ONLY receive SASReport XML results from a stored process, so behind the scenes, those result types are usually converted to SASReport XML (unless, you specified an HTML or PDF option in your SP, in which case, you'd just get an error message.)

---Web Report Studio can ONLY receive SASReport XML results from a stored process.
--Microsoft Word can only receive HTML, RTF or SASReport XML results from a stored process.
--Microsoft Excel can only receive HTML, CSV or SASReport XML from a stored process.
--EG can only receive HTML, RTF, PDF or SASReport XML results from a stored process.
--Information Deliver Portal -- because of its ability to handle streaming output using _WEBOUT, and the ability to change the content-type header, the IDP can receive just about any kind of results, as long as the content-type header is correct and the receiving system has the application referenced in the content-type header. I have successfully used a technique such as yours with a stored process that ran in the IDP.

You might want to check with Tech Support to see whether the above still holds true for SAS 9.2. All my experience with ExcelXP was in the SAS/BI 9.1.3 world, I don't have a 9.2 image to play with.

cynthia
Occasional Contributor
Posts: 7

Re: Using Tagsets.ExcelXP (version 1.95) in EG Project

Hi Cynthia,

Yes, my stored process is to be accessed solely via the IDP and we already have a number of them created...this is the first one we're trying to get to go to multiple worksheets in one workbook.

I have a track open with Tech Support, so will pursue it with them.

Thanks,
Barbara
Ask a Question
Discussion stats
  • 3 replies
  • 384 views
  • 0 likes
  • 2 in conversation