SAS 9.1.3 Integration Technologies » Developer's Guide


SAS Stored Processes
Implementing a Repository
Creating a Stored Process
Invoking a Stored Process
Publishing Stored Process Results
Working with Stored Process Results in the Client Application
IOM Direct Interface Stored Processes

Working with Results in the Client Application

If your stored process publishes the package back to the requesting application as discussed in Publishing the Results, then you will need to use the ExecuteWithResults method that is a part of the StoredProcessService. This method causes the IOM server to return to the client application a reference to the package that was created in the stored process.

The following Visual Basic code shows how this method is used:

   Dim sp as SAS.StoredProcessService
   Dim rp as SAS.ResultPackage
   Set sp = obWS.LanguageService.StoredProcessService
   sp.Repository = "file:/SASPrograms/StoredProcesses"
   sp.ExecuteWithResults "SP01", "tempdir=scratch 
      source=salesdata intable=monthly _ svar=sales 
	  filter=MONTH=MAY outtitle=Monthly Sales Data", _ rp

Note: The ExecuteWithResults method is used instead of the Execute method.

You can then use the returned reference to the package, rp in this case, to manipulate the package with the methods that are available for the IOM ResultPackage object. This object has methods available to list and view the package entries as well as the package metadata. Please see the ResultPackage Object for the complete reference documentation for this object.