Contents Developing Windows Clients  

StoredProcessService Object

A service to execute SAS language programs that are stored on a server.

StoredProcessService Full Description

Attributes

Parent Property
Repository Property
ResultPackageArchivePath Property

Methods

Execute Method
ExecuteWithResults Method
Define Method
RetrieveDefinition Method
DeleteDefinition Method

Description

This object is a service for executing stored processes. A stored process is a SAS language program stored in a repository on the server host's file system. This service enables you to execute stored processes by name and, optionally, receive the results as a ResultPackage.



Readonly Property Parent

The LanguageService.

Type: LanguageService

Description

This LanguageService containing this object.

Example

Usage


Property Repository

Designates the repository for stored processes in this SAS workspace.

Type: String

Description

This property specifies the repository which is searched when a stored process is executed.

Default:

Example

Dim sp as SAS.StoredProcessService
sp.Repository = "file:/myRoot/myRepository"

Usage

This property specifies the repository to be used by the other methods in this service. The repository name must be formed with a location prefix. A prefix of "FILE:" designates that the repository is implemented as a directory in the server's file system. The remainder of the string is the directory pathname.

Additional prefixes might become available in a future release. For example, the "LDAP:" prefix could indicate that the repository location should be resolved through a directory lookup operation for the distinguished name indicated by the supplied LDAP URL.


Property ResultPackageArchivePath

LDAP URL naming the server file system directory where result package archives are stored.

Type: String

Description

This property specifies the LDAP URL for the sasArchivePaths directory entry. This LDAP directory entry names a file system directory at which to store the result package archives that are created from stored processes executed by this service.

Default:

Example

Dim sp as SAS.StoredProcessService
sp.ResultPackageArchivePath =
   "ldap://my.server.com:123/cn=myArchive,cn=sasArchivePaths,sascomponent=Archiving,cn=SAS,o=SAS Institute,c=US"

Usage


Method Execute

Execute a stored process.

Description

This method executes a stored process. The stored process definition is found in the location identified by the Repository property. The "name" parameter indicates the particular stored process definition within this repository. The provided "nameValuePairs" parameter to this method supplies the name-value pairs used in the stored process execution.

Usage

Parameters

Name Direction Type Description
name  in  String  The stored process name within the Repository.  
nameValuePairs  in  String  A single string containing one or more name-value pairs used in the stored process execution. The pairs are specified as "name=value" and are blank separated. The length of each pair may not exceed 2048 characters.  

Example

Dim sp as SAS.StoredProcessService
sp.Execute "mySP01", "parm1=one parm2=two"

See Also


Method ExecuteWithResults

Execute a stored process that returns results.

Description

Execute the stored process defined with the provided name using the provided name/value parameters and return results. This method is similar to Execute, but it also returns a ResultPackage containing the outputs from the execution of the stored process.

The stored process must create the package and then and publish it using the "TO_REQUESTER" transport in the PACKAGE_PUBLISH call. See the Publish Package Interface CALL Routines in the Publishing Framework section of the Integration Technologies Developer's Guide for an explanation of how a SAS language program can create and publish a result package.

Usage

Parameters

Name Direction Type Description
name  in  String  The stored process name within the Repository.  
nameValuePairs  in  String  A single string containing one or more name-value pairs used in the stored process execution. The pairs are specified as "name=value" and are blank separated.  
resultPackage  out  ResultPackage  The result package created by the stored process.  

Example

Dim sp as SAS.StoredProcessService
Dim rp as SAS.ResultPackage
sp.ExecuteWithResults "mySP02", "parm1=one parm2=two", rp

See Also


Method Define

Define a stored process to the designated repository (not currently implemented).

Description

Usage

Parameters

Name Direction Type Description
name  in  String   
nameValuePairs  in  String   
sourceLines  in  String(index)   

Example

See Also


Method RetrieveDefinition

Retrieve a stored process from the designated repository (not currently implemented).

Description

Usage

Parameters

Name Direction Type Description
name  in  String   
nameValuePairs  out  String   
sourceLines  out  String(index)   

Example

See Also


Method DeleteDefinition

Delete a stored process from the designated repository (not currently implemented).

Description

Usage

Parameters

Name Direction Type Description
name  in  String   

Example

See Also

Contents Developing Windows Clients