Working with Stored Processes

Overview

You can create stored processes in two ways. The first method deploys an existing SAS Data Integration Studio job as a stored process. These stored processes are designated as version 1.0 in the Usage Version field in the Basic Properties pane. You can then execute the job outside of SAS Data Integration Studio.
The second method creates a new stored process that is not based on an existing job. These stored processes are designated as version 2.0 in the Usage Version field in the Basic Properties pane. Version 2 stored processes add storage and server access features and are not compatible with server versions before SAS 9.3. You can create and run version 2.0 stored processes on SAS 9.3 servers only.
The following table compares the compatibility and features available in the two versions of stored processes.
Stored Process Feature Comparison
Version 1.0
Version 2.0
Compatible with server versions before SAS 9.3 and SAS 9.3 servers.
Compatible with SAS 9.3 servers only.
Associated with a specific logical server, which can be a stored process server or a workspace server.
Associated with an application server context, and can be run by either a stored process server or a workspace server. You can choose whether to restrict the server type or let the client application make the server selection.
Stores source code on the application server.
Stores source code either on the application server, or in metadata.
Allows execution on the specified application server only.
Allows execution on other application servers or on the specified application server only.
Requires the *ProcessBody; comment if they are running on a workspace server.
Does not require the *ProcessBody; comment, regardless of which server is used.
Must use the stored process server to produce streaming output.
Uses either the stored process server or the workspace server to produce streaming output.
Data sources and targets can be generic streams or XML streams.
Data sources and targets can be generic streams, XML streams, or data tables.
Depending on the version, you can perform the following tasks with stored processes:

Deploy a Job as a Stored Process

You can deploy a job as a stored process on server versions before SAS 9.3 and SAS 9.3 servers. For information, see the stored process topics in Deploying Jobs.

Create a Stored Process

You can create a new stored process that does not deploy an existing job on SAS 9.3 servers. Right-click a folder in the Folders tree and select Stored Process from the New menu. You can also select Stored Process in the New item on the toolbar. Either method displays the New Stored Process wizard.
For detailed information about creating a stored process, navigate to the Execution page of the wizard. Then click Manage to display the Manage Source Code Repositories window. Finally, click Help. Open the Stored Process Management folder to review the available topics.

Convert a Stored Process

You can convert a version 1.0 stored process to version 2.0 to gain access to the new features. Right-click the stored process and select Upgrade. Note that you can see that the version number in the Usage Version field in the Basic Properties pane has been changed to 2.0. You can open the Properties window of the upgraded stored process and enable the features in the Execution tab.
You might need to deploy a job as stored process but want to take advantage of the version 2.0 features. In that case, you can deploy the job as a version 1.0 stored process. Then you can upgrade that stored process to version 2.0 and access the new features.
To make a version 2.0 stored process compatible with a server version before SAS 9.3, select the stored process. Open the Properties window to make sure that none of the newer features are being used. Then right-click the stored process and select Make Compatible. If the stored process runs on a workspace server, make sure that the *ProcessBody; comment is included in the source code. Note that you can see that the version number in the Usage Version field in the Basic Properties pane has been changed to 1.0.