Working with Projects

Creating a Client/Server Project

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:

Defining a client/server project consists of two basic steps, which are accomplished via a project wizard:

  1. Define the client location for the project by providing the name and a location for the project.

  2. 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.  [cautionend]


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:

  1. 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 Browse to find and set the directory.

    [server profile tab of user preferences window]

  2. To create a new profile, select New profile. A new profile entry that is named 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.

    [server profiles tab of User Preferences window showing new Gold Digger profile]

    Note:   To edit an existing profile, click Edit. 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 Delete.  [cautionend]

  3. Type a more descriptive profile name.

  4. Click Edit. The Edit a Server Profile window opens.

    [Edit a server profile window - no settings]

    Note:   To load the profile settings from an existing profile, select Load profile. Select the *.srv file that contains the profile settings for the existing server.  [cautionend]

  5. 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.

  6. 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.

  7. 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.

  8. 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.

    [Edit a server profile window - completed]

  9. 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:

    1. Select Signon script. The Signon Script window opens. At this stage, you can open an existing script, or create a new one.

    2. To open an existing script, use the main menu commands: File [arrow] 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 Open. The script file is copied to the Signon Script window.

    3. 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.

      [Signon Script window showing an example signon script]

    4. After you have set the script file, close the Signon Script window to return to the Edit a Server Profile window.

  10. If you need to enter start-up code that runs when the server is initialized, select Start-up Code. 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.

    [Start-up Code window showing example of start up code.]

  11. To test the server profile, select Test signon.

    [Dialog box window asking Do You Want To Connect to server goldminer.pc.sas.com?]

    The Test Result window opens, indicating whether Enterprise Miner was able to establish a connection to the server.

    [Connected Successfully! message window]

    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 Yes to save your changes. Select No to prevent your changes from being saved and to return to the SAS Enterprise Miner window. Select Cancel 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:

  1. Use the main menu to select File [arrow] New [arrow] Project

    The Create New Project window opens:

    [Create new Project window, blank]

  2. 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.

    [Create New Project window for Gold Digger Project]

  3. Select Create. The Client/server project window opens.

  4. Specify an existing Server profile or create a new one.

    • To specify an existing server profile (a .srv file), use Browse 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.

      [client server project window with Gold Digger  client server profile]

    • To create a new server profile, select New. Follow the steps outlined in Defining a New Server Profile.

  5. After you have defined the server profile, select OK to create the client/server project.

  6. A message window opens asking you if you want to connect to the server.

    [Dialog Window asking Do You Want to Connect to Goldminer.PC.SAS.com?]

    Select Yes to connect to the server or select No 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.

    [Enterprise Miner window showing Client/server project in Project Workspace and Connection Status Indicator showing an active client/server connection.]

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.

[Enterprise Miner window showing Project Navigator right-click menu with highlighted choice Disconnect From Server]

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.

[Enterprise Miner window showing right-click menu from Project Navigator with Connect to Server choice highlighted.]

Select Yes in the confirmation prompt window.

[Dialog window asking Do You Want to Connect to Goldminer.PC.SAS.com?]

Note:   You can also double-click on the connection status indicator to connect to the server.  [cautionend]

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.

[Windows Notepad window showing server.cfg file opened up for editing.]

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.  [cautionend]

space
Previous Page | Next Page | Top of Page