Run SAS Code at Server Session Boundaries

The stored process server and the workspace servers can be configured to run SAS code during start-up and shutdown of their server sessions.
Note: In SAS 9.3, the IOM servers also support running SAS code at server start-up and shutdown (server boundaries). For more information, see INITSTMT= System Option in SAS System Options: Reference and TERMSTMT= System Option in SAS System Options: Reference.
For example, you might start and stop an ARM transaction to accurately trace a user’s activity on a workspace server. Or, you might initialize certain SAS librefs for a particular user.
You configure this feature for the server from the Properties dialog box (Propertiesthen selectOptionsthen selectSet Server Properties).
Specifying SAS Code to Run at Server Start or Stop
Specifying SAS Code to Run at Server Start or Stop
In another example, you might want to configure your stored process server to run SAS code to override or change the value of the default SAS options before the execution of the requested stored process. This is a server-wide setting that runs before each execution.
Suppose you want to change the line size and page size. You can write a simple stored process that sets line size to 150 and page size to 30:
options ls=150 pagesize=30;
and locate the stored process containing your new line and page size options in a directory where the stored process server can read it.
In the Initialization program text box, enter the path and filename that contains your SAS options code.
For example:
C:\myOptions\setoptions.sas
Now, the stored process server runs your option override code before each requested stored process.