BookmarkSubscribeRSS Feed
UCFAngel
Obsidian | Level 7
I'm executing a stored process with the IDP that outputs a PDF. The stored process executes and I get a new browser window with the PDF displayed. However, the title in the browser tab says 'Stored Process Error'. Does anyone know where that could be coming from? Is there somewhere that I have to tell SAS what to put there? Thanks!
6 REPLIES 6
Vince_SAS
Rhodochrosite | Level 12
Try rerunning the program with _DEBUG=log,trace to see if any error is reported.

Vince DelGobbo
SAS R&D
Cynthia_sas
SAS Super FREQ
Hi:
When I generate PDF results in the Portal, my browser launches Acrobat Reader. The PDF file does not open in IE. So I'm not sure what the issue is. Are you using STPSRV_HEADER to launch Acrobat Reader when the file comes down the pipeline????

This may be a question better aimed at Tech Support.

cynthia

Here is the SP that I registered and launched from the portal (it was written to illustrate STARTPAGE=NO option):
[pre]
** Execute from within Enterprise Guide or from a web based client,;
** like the Stored Process Web Application or the Information Delivery Portal.;

data _null_;
rc = stpsrv_header('Content-type','application/pdf');
rc = stpsrv_header('Content-disposition','attachment; filename=temp.pdf');
run;

ods pdf body=_webout startpage=no;

proc print data=sashelp.class noobs;
title 'test pdf and startpage=no';
run;

ods pdf text="Before Proc Means";

proc means data=sashelp.class median;
title 'testing startpage option with pdf and content type header';
var age height;
run;

ods pdf text="After Proc Means";

ods pdf close;

[/pre]
Vince_SAS
Rhodochrosite | Level 12
When it needs to run a stored process, the SAS Information Delivery Portal forwards the request to the SAS Stored Process Web Application for execution. Either add a parameter named _DEBUG to the stored process and specify the value at run time via the Portal, or use the STP WebApp to execute it directly and specify _DEBUG on the URL.

Vince DelGobbo
SAS R&D
UCFAngel
Obsidian | Level 7
Thanks so much for your quick replies!

We applied some hot fixes this morning and now the browser tab displays 'https://ourserver:8443/SASStoredProcess/do', which is fine with me. As long as we are not telling our users that an error occurred when it didn't, I am happy.

The way our platform is setup we can only use the STP WebApp from within the portal - we have a customized single signon that won't allow us to use the app from a URL. The PDF opens in the browser window in a new tab instead of Acrobat. I guess it uses the browser plug-in. The tab heading is what displayed 'Stored Process Error'.

When the stored process runs it prompts the user for input parameters using a JSP page. The following code begins the report output process. I do not use the second line because I don't want to prompt the user to save or open - I just want the report to open as soon as it is generated.

data _null_;
rc = stpsrv_header('Content-type','application/pdf');
run;

/*Begin PDF Output*/
ods listing close;
options orientation=landscape papersize=letter;
ods pdf file=_webout notoc style=UCF uniform; Message was edited by: UCFAngel
Vince_SAS
Rhodochrosite | Level 12
I'm glad you got it working.

Because you are using a JSP page to prompt users for input, I would think that you could add a new prompt for _DEBUG to that page, if you need to in the future.

Vince DelGobbo
SAS R&D
UCFAngel
Obsidian | Level 7
I just upgraded my Adobe Reader to version 9.1 and now the browser tab displays 'SASStoredProcess', which is even better than displaying the URL. When you mouse-over the tab it displays the URL as specified in my previous reply.

Thanks again for your input!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 919 views
  • 0 likes
  • 3 in conversation