Previous Page | Next Page

Getting Started with SAS in UNIX Environments

Running SAS on a Remote Host in UNIX Environments


Introduction to Running SAS on a Remote Host

When you invoke SAS in an interactive mode, you can run SAS on your local host, or you can run SAS on a remote host and interact with the session through an X server running on your workstation. The server provides the display services that are needed for the X Window System.

Most of the time, the server name is derived from the computer's name. For example, if your computer is named green , the name of the server is green:0.0 . In most cases, the X server will already be running when you log in. If you need to start your server manually, consult the documentation that is provided with your X Window System software.

To run SAS on a remote host, you must tell SAS which display to use by either setting the DISPLAY environment variable or specifying the -display X command line option.


Steps for Running SAS on a Remote Host

To run SAS on a remote host, follow these steps:

  1. Make sure that the clients running on the remote host have permission to connect to your server. With most X servers, authorization is controlled by using an .Xauthority file that is located in the user's home directory. Additionally, the xhost command can be used to circumvent authority. To use the xhost client to permit all remote hosts to connect to your server, enter the following command at the system prompt on the system that is running your X server:

    xhost +

    If your system does not control access with the xhost client, consult your system documentation for information on allowing remote access.

    For information about editing and displaying authorization information, see the UNIX man page for xauth.

  2. Log in to the remote system, or use a remote shell.

  3. Identify your server as the target display for X clients that are run on the remote host. You can identify your server in one of two ways:

    1. Set the DISPLAY environment variable. In the Bourne and Korn shells, you can set the DISPLAY variable as follows:

      DISPLAY=green:0.0
      export DISPLAY

      In the Korn shell, you can combine these two commands:

      export DISPLAY=green:0.0

      In the C shell, you must use the UNIX setenv command:

      setenv DISPLAY green:0.0

      The DISPLAY variable will be used by all X clients on the system.

      Note:   To determine the shell for your current system, type ps at the UNIX command prompt or check the value of the SHELL environment variable.  [cautionend]

    2. Use the DISPLAY system option. For example:

      sas -display green:0.0

      If you have trouble establishing a connection, you can try using an IP address instead of a display name, for example:

      -display 10.22.1.1:0.0

      Note:   This option is a command line option for the X Window System, not for SAS. Specifying this option in a SAS configuration file or in the SASV9_OPTIONS environment variable might cause problems when you are running other interfaces.  [cautionend]


Preventing SAS from Attempting to Connect to the X Server

To prevent SAS from attempting to connect to the X server, unset the DISPLAY environment variable and use the -noterminal SAS option on the command line. The -noterminal option specifies that you do not want to display the SAS session. You must specify this option to generate a graph in batch mode. You must also specify this option when you use PROC IMPORT and PROC EXPORT. For more information, see "Running SAS/GRAPH Programs" in SAS/GRAPH: Reference.


Troubleshooting Connection Problems

If SAS cannot establish a connection to your display, it prints a message that indicates the nature of the problem and then terminates. An example of a message that you might receive is the following:

ERROR:  The connection to the X display server could not be made.
        Verify that the X display name is correct, and that you have 
        access authorization. See the online Help for more information
        about connecting to an X display server.

Make sure that you have brought up the SAS session correctly. You might need to use the xhost client (enter xhost + ) or some other method to change display permissions. You can also specify the NODMS system option when you invoke SAS to bring your session up in line mode.

If you are unable to invoke SAS, try running another application such as xclock . If you cannot run the application, you should contact your UNIX system administrator for assistance.

Previous Page | Next Page | Top of Page