BookmarkSubscribeRSS Feed
Not applicable
I'd like to extend a stored process that does some tables and is currently being called through the SAS Portal or EG. I would like to use the AMO to lauch it from within Word, Excel, or PowerPoint and return output tailored to that app (i.e. different ODS statements, templates,drivers, etc.).

So in the stored process I want to test what app intiated the stored process ?


- Matthew
Currently, in the list of available reserved macro variables, there is NO way to test the client app that is requesting a SP to execute.

Workarounds I have used are to have the user select a specific destination or app choice as one of their parameters...and then test that parameter and change _ODSDEST accordingly.

The issue with changing _ODSDEST however, is that, no matter what you do, PowerPoint will ONLY accept/receive/render SASReport XML output -- so a lot of your ODS syntax will NOT work for PowerPoint. And, if you changed _ODSDEST to HTML for PowerPoint, the results are changed to SASReport anyway -- or you will get an error message if you use HTML ODS options for SASReport in PowerPoint.

For Word or Excel, you can also instruct the user to use Options to set the kind of stored process results they want. And, if you use the ACTXIMG driver for all the client apps, you might be able to eliminate making a graph driver choice.

Also, if you are returning results to Word or Excel, the only ODS destinations that those 2 have in common are SASReport XML and HTML-based. Word also accepts RTF output and Excel also accepts CSV -- but for the most common report output that can be affected by STYLE templates in Word and Excel, your best bet is sticking with ODS HTML3 or ODS MSOFFICE2K as the destination.

Depending on the different customizations you want to do for the different client apps, you may want to consider contacting SAS Technical Support for more help on this topic.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation