Working with Projects |
Enterprise Miner enables you to access data sources (such as SAS data sets or database management systems) on a server to use with your local SAS Enterprise Miner session. SAS/CONNECT is the cooperative processing software that establishes the client/server connection between the remote and local hosts. For details, see the SAS/CONNECT User's Guide.
The client/server functionality provides the following advantages:
distributes data-intensive processing to the most appropriate machine
minimizes network traffic by processing the data on the server machine
minimizes data redundancy by maintaining one central data source
enables you to toggle between remote and local processing.
Defining a client/server project consists of two basic steps, which are accomplished via a project wizard:
Define the client location for the project by providing the name and a location for the project.
Provide a server profile. You can specify an existing profile or create a new profile.
Note: To use data sets that have user-defined formats on the server, you must ensure that the formats are available both locally and on the server. At the client, assign a format search path in a project's start-up code. At the server, use the server seed code to point to the format catalogs that reside on both the client and server.
Defining a New Server Profile |
Before you define the location and name for the client/server project, you might want to define a new server profile as part of your user preferences. A server profile contains all of the information that is necessary to establish a connection to the remote server.
To define a new server profile, follow these steps:
Use the Options pull-down menu from the SAS Enterprise Miner window to select the User Preferences item.
The User Preferences window opens. You define the server profile in the Server profiles tab. This tab lists the current server profile directory and all of the profiles that are stored in this directory. By default, server profiles are stored in the SASUSER folder where Enterprise Miner was installed. To set the profile directory, select
to find and set the directory.To create a new profile, select Untitled is added to the list of server profiles. You can highlight the new profile to select it and type in a new name, such as Gold Digger.
. A new profile entry that is namedNote: To edit an existing profile, click . To rename a profile, right-click on the server profile in the list and select Rename. Type the profile name. To delete a profile, click .
Type a more descriptive profile name.
Click
. The Edit a Server Profile window opens.Note: To load the profile settings from an existing profile, select . Select the *.srv file that contains the profile settings for the existing server.
Type the remote host address name. The Host can be the machine name (for example, golddigger.pc.sas.com) or its numeric IP address (123.321.12.99). The address name for a NETBIOS network can contain a maximum of eight characters.
Select the drop-down arrow to set the Comamid parameter. The Comamid parameter identifies the communication access method that is used to connect to the remote host.
If a spawner is necessary to establish the remote connection, then type the share port that the agent spawner runs on. You can type either the service name (for example , shr3) or the port number (for example, 5012). The Port field is required if you are running a Windows NT server where the agent spawner has been set up to run on the share port. It is not required on other platforms.
Type the Default remote data path where Enterprise Miner will store large intermediate files on the server. The path should be specified according to the host machine's naming convention. The server must be able to reference this location, and you must have write access to this path. Files in this path are accessed via remote library services when needed; they are not moved to the client.
Set the sign on script file. If Comamid is set to TCP, then you must set the script file that is used to initiate and terminate the remote session. A script file is an external file on the local system that contains special SAS statements that control the connection. To set the script file, follow these steps:
Select
. The Signon Script window opens. At this stage, you can open an existing script, or create a new one.To open an existing script, use the main menu commands: File Open Alternatively, you can select the Open tool icon (third tool icon on the toolbox). Find and select the script (.scr) file in the Open window and then click
. The script file is copied to the Signon Script window.To create a new script file, type the script file statements in the Signon Script window or modify an existing script file. Save the script file by using the File pull-down menu to select Save As.
After you have set the script file, close the Signon Script window to return to the Edit a Server Profile window.
If you need to enter start-up code that runs when the server is initialized, select
. The Start-up Code window opens. Type the start-up code in the Start-up Code window. You do not need to enclose the statements in an RSUBMIT block. You might want to use this feature to assign a libref to a remote directory that contains SAS data sets via a LIBNAME statement or assign the SAS format search path via the FMTSEARCH option. When you have finished entering your start-up code, close the window. Your code is saved, and you return to the Edit a Server Profile window.To test the server profile, select
.The Test Result window opens, indicating whether Enterprise Miner was able to establish a connection to the server.
If the connection failed, review the above steps to determine where you might have incorrectly configured the server profile. You might want to consult your systems administrator.
After you have configured the server profile, close the Edit a Server Profile window. A message window opens that prompts you to save your changes to the server profile. Select
to save your changes. Select to prevent your changes from being saved and to return to the SAS Enterprise Miner window. Select to return to the Edit a Server Profile window.How to Create a Client/Server Project |
To create a client/server project, follow these steps:
Use the main menu to select File New Project
The Create New Project window opens:
Type a name in for the project and select the Client/server project box. Use the Location field to specify the path where you want to store your project files. The path that you specify becomes the root of your project directory structure.
Select
. The Client/server project window opens.Specify an existing Server profile or create a new one.
To specify an existing server profile (a .srv file), use
to find and set the server profile or type the server profile pathname. You can also define a server profile in advance as part of the user preferences.To create a new server profile, select Defining a New Server Profile.
. Follow the steps outlined inAfter you have defined the server profile, select
to create the client/server project.A message window opens asking you if you want to connect to the server.
Select
to connect to the server or select to run the project locally. The project is automatically loaded as the active project in the SAS Enterprise Miner window. The connection status indicator at the lower-right corner of the window indicates whether the project is connected to the server.To disconnect from the server, right-click on the project folder in the Project Navigator and select Disconnect from server from the pop-up menu.
To connect to the server, right-click on the project folder in the Project Navigator and select Connect to server from the pop-up menu.
Select
in the confirmation prompt window.Note: You can also double-click on the connection status indicator to connect to the server.
If you have an application that launches Enterprise Miner, but establishes a connection beforehand, you can ensure that Enterprise Miner uses the existing connection by editing the server.cfg file in your project's EMPROJ subdirectory.
Type the CONID for the existing connection. For example, if your application connects to a server using CONID=myhost, then you would type this value for the CONID option in your server.cfg file. When you make these changes, Enterprise Miner will not try to make a connection when opening the project if a connection already exists. If Enterprise Miner opens a project and uses an existing connection instead of creating one, the connection is not terminated when you close the project.
Using a Server Profile in Batch Mode to Connect to a Server |
You can use your server profile in batch mode to connect to the server by submitting the following code from the SAS Program Editor window:
%let profile=c:\profiles\my server.srv; proc display c=sashelp.dmcon.connect.scl; run;
Note: The code assumes that your server profile is named 'my server.srv' and is stored in c:\profiles. You should modify those parameters to match the server profile name and storage path with those on your installation.
Copyright © 2006 by SAS Institute Inc., Cary, NC, USA. All rights reserved.