SAS 9.1.3 Integration Technologies » Server Administrator's Guide


Starting Servers
Server Startup Command
Specifying Metadata Connection Information
Customizing the Server Command for COM/DCOM Connections
Initializing UNIX Environment Variables for Workspace Servers
Invoking (Starting) the Spawner
On Windows
Updating a Spawner Service
On UNIX
On Alpha/VMS
Server and Services Startup Order
Reference Materials
Object Server Parameters
Spawner Invocation Options
Starting Servers

Customizing the Workspace Server Startup Command for COM/DCOM Connections

A workspace server is launched by COM in response to a CoCreateInstance() call (dim as new in Visual Basic) from a client. When COM launches a server, it checks the Windows registry for the launch command. The launch command is stored under the CLSID for the server type. There are two versions of the Workspace class: the original implementation from SAS 8 (Workspace Version 1.0) and a new version that was introduced in SAS 9 (Workspace Version 1.1). SAS 9 also provides a complete emulation of Workspace Version 1.0 that installs itself to be launched regardless of which version is requested.

A client can request the minimum version that it needs. Because most clients do not absolutely require any of the extra features that were introduced in SAS 9, they will typically request Workspace Version 1.0. However, the launch command that is used should be correct for both CLSIDs.

The registry locations for these are as follows:

Workspace Version 1.0:

HKEY_CLASSES_ROOT\CLSID\{440196D4-90F0-11D0-9F41-00A024BB830C}\LocalServer32

Workspace Version 1.1:

HKEY_CLASSES_ROOT\CLSID\{CF7BC7E6-C7E8-11D5-87E3-00C04F38F9F6}\LocalServer32

When SAS 9 is installed, or when you execute the sas -regserver command, SAS updates these keys to point to itself. The command that is set up by default is adequate for most purposes, but you can change it with the regedit utility if necessary.

If, for example, you want a workspace server that is launched by COM to contact a metadata repository in order to obtain additional pre-assigned libraries, then you can modify the launch command as follows:

C:\PROGRA~1\SAS\SAS9~1.1\SAS.EXE -config
  "C:\Program Files\SAS\SAS 9.1\sasv9.cfg" -objectserver
  -objectserverparms "metaautoinit server=
    'Sales01 - Logical Workspace Server'"
  -metaprofile c:\omr.xml -nologo -noterminal -noxcmd
  -metaconnect "SAS Metadata Server Connection"

Note that COM launches do not accept long filenames for the EXE file and that they do not start in a well-defined initial directory unless you use the SASINITIALFOLDER= option. The preceding command uses the full path for the METAPROFILE option in order to compensate for the lack of a default directory. For more information, see Specifying Metadata Connection Information. Note also that workspace servers require the METAAUTOINIT object server parameter as an indication that they should contact a SAS Metadata Repository.