SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 39250: SAS® 9.2 Stored Process Server enhancements: Request Init and Term programs, Session Init and Term programs

DetailsAboutRate It

In SAS® 9.2, the SAS® Stored Process Server supports programs that run at request initialization, request termination, session initialization and session termination.

A Request Initialization program is executed at the beginning of each SAS® Stored Process request and a Request Termination program is executed at the end of each SAS Stored Process request.

Follow these steps to specify a Request Initialization program or a Request Termination program.

  1. Using SAS® Management Console, under Server Manager, select your Logical Stored Process Server. For example, select SASApp – Logical Stored Process Server.
  2. Right–click on SASApp – Logical Stored Process Server and select Properties.
  3. In the SASApp – Logical Stored Process Server Properties dialog box, select the Options tab.
  4. Click the Set Server Properties button.
  5. In the newly opened Stored Process Properties dialog box, select the Request tab.
  6. Specify an Initialization Program (name of a program to run before each request).

    For example:

    C:\your–directory\stp_programs\init.sas
  7. Specify an Termination Program (name of a program to run after each request).

    For example:

    C:\your-directory\stp_programs\term.sas
  8. Restart the SAS Stored Process Server.

A Session Initialization program is executed when a SAS Stored Process Session is created and a Session Termination program is executed when a SAS Stored Process Session is terminated.

Follow these steps to specify a Session Initialization program or a Session Termination program.

  1. Using SAS Management Console, under Server Manager, select your Logical Stored Process Server. For example, select SASApp – Logical Stored Process Server
  2. Right–click on SASApp – Logical Stored Process Server and select Properties.
  3. In the newly–opened Stored Process Properties dialog box, select the Session tab.
  4. Specify an Initialization Program (to be run when a session is created).
  5. Specify an Termination Program (to be run when a session is terminated).
  6. Restart the SAS Stored Process Server.

You will also need to create the source code files, at the locations that you specified above, for the programs that are to be executed. As an example, your init.sas program might contain an OPTIONS statement or other SAS code that you want to run before each SAS Stored Process request.

More Information

For more information about these and other SAS® 9.2 Stored Process enhancements see What's New in SAS 9.2 Stored Processes

Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS Integration Technologiesz/OS9.2 TS2M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS2M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS2M0
Microsoft Windows XP 64-bit Edition9.2 TS2M0
Microsoft® Windows® for x649.2 TS2M0
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M0
Microsoft Windows Server 2003 Standard Edition9.2 TS2M0
Microsoft Windows XP Professional9.2 TS2M0
Windows Vista9.2 TS2M0
64-bit Enabled AIX9.2 TS2M0
64-bit Enabled HP-UX9.2 TS2M0
64-bit Enabled Solaris9.2 TS2M0
HP-UX IPF9.2 TS2M0
Linux9.2 TS2M0
Linux for x649.2 TS2M0
OpenVMS on HP Integrity9.2 TS2M0
Solaris for x649.2 TS2M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.