Desktop productivity for business analysts and programmers

Link to Stored Processes

Reply
Frequent Contributor
Posts: 97

Link to Stored Processes

Hi

I have my reports as Stored Processes which uses a proc print in the end.

Requirement 1:
I want to call these Stored Processes through some other web application and NOt through SAS. Hence I need to give them a url (link) for each Stored Process. If yes then what is the url and how should we pass the session id and login credentials.

Requirement 2:
Also, when I open a report through SASStoredProcess, how can I supress the execute options shown in the Stored Process. When I click on the Stored Process the Sp should be executed directly.
Frequent Contributor
Posts: 97

Re: Link to Stored Processes

Just to add a bit more, I want to access through a web application maybe java or ASP

So I think there should be some way where I could create a session and open a Stored Process through a url.
SAS Super FREQ
Posts: 8,720

Re: Link to Stored Processes

Hi:
There are other ways to invoke a stored process. The technologies you should look at are the SAS Stored Process Web Application or SAS BI Web Services for Java or SAS BI Web Services for .NET -- any of these would allow you to write your own custom front end to invoke a stored process.

SAS Stored Process Web Application: This is a Java Web application that executes stored
processes and returns results to a Web browser. The SAS Stored Process Web Application
is included with the SAS Web Infrastructure Kit, a component of SAS Integration
Technologies as described here:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/stpwebapp.html#defaultform

SAS BI WEB Services: There is a .NET client and a Java client, as described here:
http://support.sas.com/rnd/itech/doc9/dev_guide/websrvcs/index.html
http://support.sas.com/rnd/itech/doc9/dev_guide/websrvcs/using.html

I have only had experience using the SAS Stored Process Web Application, when I use that, I can execute a stored process via URL using the following URL as a model. Anchor tag:
<a target="new" href="http://localhost:9090/SASStoredProcess/do?
_program=/STP_Orion/Extra/testSPWA">Test this stored process</a>

If I had a different host or port number then the URL might be different:
<a target="new" href="http://www.wombat.com:5450/somedir/SASStoredProcess/do?
_program=/STP_Orion/Extra/testSPWA">Test this stored process</a>

This assumes that I have a Stored Process Repository called STP_Orion, with a sub folder of Extra and inside that location, I have a stored process with the name testSPWA. The metadata for the stored process points to the location of the .SAS file that should be executed by the Stored Process Web Application. And all my services and Tomcat need to be started before I would try to use the URL.

If you go out to the Integration Technologies Web site, you will find that the syntax for using .NET or Java is different. So, first, you have to decide which method for developing a custom application you're going to use. Then you'll have to look at the sample programs and read the documentation for the method you finally decide on.

cynthia
Frequent Contributor
Posts: 97

Re: Link to Stored Processes

Hi Cynthia

I am a bit confused with the links provided however the solution is very near to what I want.

I have a web application in which I want the Stored processes listed as hyperlinks. On clicking the link the corresponding Stored Process should be executed in a new window.

The below mentioned URL executes a stored process provided we have logged on to SASStoredProcess Server. i.e. for that session only and using the session credentials

http://ServerName:8080/SASStoredProcess/do?_action=data&_program=SBIP%3A%2F%2FFoundation%2FBIP+Tree%...

1. Is there any way by which we can create a session and access the SP directly through URL

The Hopper
SAS Super FREQ
Posts: 8,720

Re: Link to Stored Processes

Hopper:
I am frequently confused, but I've learned to live with it! Reading the documentation generally helps my confusion for questions related to SAS. Life in general is a different topic for a different forum. So, here goes on stored processes...

The method by which you would start a session -- so the session persists -- will be different based on whether you're using the Stored Process Web Application or one of the other methods. That's one issue and I believe you will find the answer here:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sessions.html
and if you need more help persisting sessions, Tech Support is the place to go.

The other question about logging onto the server and needing credentials -- that's a different question. I don't know whether you WANT to supply credentials or not. If you use the stored process server, then the user's credentials are not needed to launch the SAS session, but there is still some metadata authentication that is going to take place.

When you say you want to "access the SP directly" -- I don't know what you mean -- you still are using the metadata server, you are still launching a SAS Session. "SASStoredProcess/do" is a program that grabs the stored process from the defined metadata repository location and submits it to whatever server is supposed to be used for that stored process. You might consider contacting Tech Support for further help with this request -- you can't really bypass the metadata server. I don't know enough about the BI Web Services for Java or the BI Web Services for .NET to know how they handle authentication and starting up the SAS session. I figure that some kind of login will still need to be done -- that makes the most sense to me. Tech Support would know for sure.

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 123 views
  • 0 likes
  • 2 in conversation