Chapter Contents


SAS/CONNECT User's Guide

Example 3. Compute Services: Remote Graphics Processing


If you have SAS/GRAPH software installed on both your local host and remote host, you can submit graphics programs from your SAS session on a local host to a SAS session on a remote host, have the procedure execute on the remote host, and display the graphics output on your local host (or on a device attached to your local host). The link is especially useful when you want to generate graphics on your local host by using a large database on the remote host.

The GRLINK driver is a special driver available with SAS/CONNECT. You must always use the GRLINK driver on the remote host when using the link to display remote host graphics on your local host.

If you frequently use the link for remote graphics processing, consider specifying the GRLINK device driver in a script file (if you use a script file with the SIGNON command). You do this by including the driver specification for the remote host in the TYPE statement that invokes the remote SAS System. In the following example, if you are using TSO by means of a TCP/IP connection, change the TYPE statement in the script file to the following:

"sas options(remote=tcp device=grlink)";

By doing this every time you use the SIGNON command, you automatically specify the GRLINK driver on the remote host.

Note:   This has already been specified in the sample scripts supplied with your SAS software.  [cautionend]


Use the RSUBMIT command to submit your SAS statements. This includes any LIBNAME statement that is needed by the remote host. When the SAS/GRAPH procedure runs on the remote host, the output is displayed on your local host or on an attached device (based on the driver that you specified in your local session). If you did not specify a remote host driver name in step 2, you are prompted by the remote host to do it.

goptions device=hplj;


   proc sort data=master.bg_reserve out=tmp;
      by origin rental_type;

   proc summary data=tmp vardef=n noprint;
      by origin rental_type;
      output out=temp_rental;

   goptions dev=grlink ftitle=centx 
   ftext=simplex htitle=2;

   title 'Rental Types by Franchise';
   pattern value=solid color=blue;

   axis1 label=('Franchise')
   axis2 label=none width=3;
   axis3 label=none 
   order=0 to 1000 by 100 width=3;
   proc gchart data=temp_rental;
      label rental_type='00'x;
      label origin='00'x;
      hbar rental_type /  frame
      sumvar= _freq_


[1] Specify an EGA graphics adapter to display the remote host graph on your local host. You can specify the name of the graphics driver for your local host display or its attached hardcopy device. To get a complete list of values for the DEVICE= option, run the GDEVICE procedure in your local SAS session.
[2] Remote submit procedures to preprocess data and graphics procedures to the remote SAS session.
[3] Specify GRLINK device driver so that commands to draw the graph will be sent over the network to the local session.

When using the link to display remote host graphs, you can use any graphics procedure on the remote host (including the GREPLAY procedure) and any graphics device driver on the local host.

The GRLINK remote host driver uses the attributes of the driver that is specified in the local host session when selecting default colors, character sizes, and other attributes. For example, if you specify DEVICE=EGAL in your local session, the GRLINK driver uses the default colors of the EGAL driver, but if you specify the printer driver DEVICE=FX85 in your local session, the GRLINK driver uses only black as a foreground color.

Note the following reminders when using the link for graphics:

You can also transfer catalog entries containing graphics output by using the UPLOAD and DOWNLOAD procedures, as described in Example 11. DTS: Uploading a Catalog That Contains Graphics Output.

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.