Your SAS programs, embedded in web apps and elsewhere

HTML Output in Storec Processes

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

HTML Output in Storec Processes

I thought the %stpbegin controled the ods.  When I do a simple gplot, the graph is generated fine.  But when I do a proc print, nothing is generated. I get the msg:

WARNING: No output destinations active.


Accepted Solutions
Solution
‎05-22-2012 03:24 PM
Occasional Contributor
Posts: 10

Re: HTML Output in Storec Processes

Problem solved.  The "Stream" check box on the Execution panel of the Metadata registration in SMC needed to be checked.  I don't know why, but it does.

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,866

Re: HTML Output in Storec Processes

Hi:

  Not enough information. You said "when you do a proc print" - -but where -- in the same stored process with the gplot? In a new stored process? What is your client application (Word, Excel, EG, Web Report Studio, Info Delivery Portal, Stored Process Web App,) that is submitting the stored process? You are correct that the %stpbegin goes at the top of your stored process code and begins the capture of ODS output. (If all you had in your program was a PROC SORT, for example, nothing "visible" would be produced by PROC SORT -- but if you correctly have PROC PRINT between
%stpbegin/and %stpdend, then you should see output.) The %stpend goes at the end of your stored process and closes all open destinations. One thing that could possibly be interfering with %stpbegin/%stpend would be an:

ods _all_ close;  <--this might be placed incorrectly before the proc print -- should not have this in the code at all

or

%stpend;   <--- this might be placed incorrectly before the proc print (should be placed AFTER proc print)

...or other "exclusionary" statements (like ODS EXCLUDE ALL or ODS SELECT NONE) might be buried in your code someplace. Also, failing to use proper step boundaries (such as RUN; or QUITSmiley Wink can prevent results from being generated. But usually, the no output destinations active message comes from prematurely closing all the open destinations.

  So without more information (such as seeing more of your code, and how you are requesting the SP to run, knowing how you are registering the stored process in the metadata -- what server, what type of results, etc), it's hard to give more concrete suggestions.

  You can also open a track with Tech Support on this issue -- they could look at all of your code, at your metadata and collect all the information they need to help you come to a resolution.

cynthia

Occasional Contributor
Posts: 10

Re: HTML Output in Storec Processes

Posted in reply to Cynthia_sas

The code:

%global device sdate edate _odsdest;

*ProcessBody;

data _null_;

    d1="&sdate";

   d2="&edate";

   ds=input(d1,date11.);

   de=input(d2,date11.);

   call symput('start',ds);

   call symput('end',de);

data ip;

    set pricea.nc_cs_upgrd_201205_n(keep=device device_type equip_inst_eff_dt acct_type prior_device prior_device_type  where=(device=:"&device" and acct_type=:'U'));

    upgds=1;

    if &start le equip_inst_eff_dt le &end;

proc sort;

    by equip_inst_eff_dt device prior_device_type prior_device;

proc means sum noprint;

    output out=sums(drop=_type_ _freq_) sum=;

    var upgds;

    by equip_inst_eff_dt device prior_device_type prior_device;

%STPBEGIN; 

proc print;

TITLE1 "From Upgrades for &device";

FOOTNOTE ;

RUN;

%STPEND;

Solution
‎05-22-2012 03:24 PM
Occasional Contributor
Posts: 10

Re: HTML Output in Storec Processes

Problem solved.  The "Stream" check box on the Execution panel of the Metadata registration in SMC needed to be checked.  I don't know why, but it does.

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 523 views
  • 0 likes
  • 2 in conversation