Using the GDEVICE Procedure


Using the GDEVICE Windows

You can use the GDEVICE windows instead of program mode to view, modify, copy, create, or delete device entries. You perform tasks in the GDEVICE windows by entering values in the fields, by using the pulldown menus , and by issuing commands from the command line.

These are the thirteen GDEVICE windows in order of appearance:

  • Directory Window

  • Detail Window

  • Parameters Window

  • Gcolors Window

  • Chartype Window

  • Colormap Window

  • Metagraphics Window

  • Gprolog Window

  • Gepilog Window

  • Gstart Window

  • Gend Window

  • Host File Options Window

  • Host Commands Window

The fields in these windows represent device entry parameters. The GDEVICE windows group the device parameters by topic, to make it easy for you to review or modify the entry. If you open the device entry in edit mode, you can modify the fields directly. For a description of each field, see the corresponding parameter in Chapter 8, Graphics Options and Device Parameters Dictionary, on page 261 or refer to the SAS Help facility. For a complete list of device parameters, see ADD Statement on page 921.

Note: The parameters are sometimes an abbreviation of the field names , but the correspondence should be clear. For example, in the Detail window, the "Driver query" field corresponds to the DRVQRY parameter, and the "Queued messages" field corresponds to the QMSG parameter.

This section briefly describes the GDEVICE windows; for a complete description of each window and its fields, refer to the SAS Help facility.

GDEVICE Window Commands

You can navigate and manipulate the GDEVICE windows by entering commands on the command line or selecting them from the menus. For a complete description of all the GDEVICE window commands, refer to the SAS Help facility.

Note: In a Windows environment, the GDEVICE commands are presented on pop-up menus rather than on the menubar. Right-click a GDEVICE window to access a pop-up menu.

GDEVICE Window Descriptions

DIRECTORY Window

This window appears when you start the GDEVICE procedure in window mode. It lists all the device entries in the default catalog or the catalog you specified in the PROC GDEVICE statement. You can use it to

  • copy, rename, or delete device entries in the catalog

  • select a device entry whose parameters you want to browse or edit.

  • You can enter these commands in the Directory window selection field:

  • B S

    • open the Detail window and browse (B) or, if you are in edit mode, edit (S) the selected device entry.

  • D

    • delete the selected device entry. You cannot restore a device entry once it has been deleted.

  • E

    • open the Detail window and edit the selected device entry.

  • R

    • rename the device entry and/or description.

You cannot edit the TYPE and UPDATED fields in the Directory Window.

click to expand
Figure 31.1: The DIRECTORY Window

Detail window

This window contains device parameters that control basic characteristics of the device, for example, the size of the graphics output area.

click to expand
Figure 31.2: The Detail Window

From this window you can access any of the subsidiary GDEVICE windows by

  • entering the name of the window on the command line

  • selecting the window from the Tools pulldown

  • opening the subsidiary windows in order of appearance by using the View pulldown and choosing Next Screen, or using the NEXTSCR command on the command line.

Parameters window

This window includes additional device parameters that affect the way graphs are drawn. For example, you choose whether certain graphics primitives are drawn by your hardware or by SAS/GRAPH software, whether to feed paper to printers or plotters automatically, and whether to have SAS/GRAPH software prompt you with messages under certain conditions.

Note: If the device does not support a hardware characteristic, the catalog entry cannot enable the support.

click to expand
Figure 31.3: The Parameters Window

Gcolors window

This window lists the colors that the device driver uses by default. When you do not explicitly specify the color of a graphics feature in your program or in a GOPTIONS statement, SAS/GRAPH software uses this list to determine what color to use.

click to expand
Figure 31.4: The Gcolors Window (partial view)

Chartype window

This window lists the hardware fonts that the device can use, along with information about the size of the characters . The Chartype value is the value you can use to reference a font in another window. For example, you would enter a Chartype number in the Parameters window's Chartype field.

click to expand
Figure 31.5: The Chartype Window (partial view)

Colormap window

This window allows you to specify a color map for the device. The FROM field specifies the name to assign to the color designated by the color value, and the TO field specifies a SAS/GRAPH color name up to eight characters long. Once you have defined the color mapping, you can use the new color name in any color option. For example, if your device entry maps the color name DAFFODIL to the SAS color value PAOY, you can specify COLOR=DAFFODIL on any statement that supports a COLOR= option, and the driver will map this to the color value PAOY.

click to expand
Figure 31.6: The Colormap Window (partial view)

Metagraphics window

This window is used by all drivers that support multiple color spaces, for example, RGB or CMYK. It is also used if the device entry is a Metagraphics ( user -written) driver. Metagraphics drivers are created when an Institute-supplied device entry cannot be adapted to support your graphics device. For information about Metagraphics drivers, contact Technical Support.

Do not alter the fields in the Metagraphics window unless you are changing the color scheme (colortype), or building a Metagraphics driver.

click to expand
Figure 31.7: The Metagraphics Window

Gprolog window

This window enables you to specify one or more hexadecimal strings that are sent to the device just before graphics commands are sent. Additional commands can be sent with the PREGPROLOG= and POSTGPROLOG= graphics options. See Chapter 8, Graphics Options and Device Parameters Dictionary, on page 261 for details.

click to expand
Figure 31.8: The Gprolog Window (partial view)

Gepilog window

This window enables you to specify one or more hexadecimal strings that are sent to the device just after graphics commands are sent. Additional commands can be sent with the PREGEPILOG= and POSTGEPILOG= graphics options. See Chapter 8, Graphics Options and Device Parameters Dictionary, on page 261 for details.

click to expand
Figure 31.9: The Gepilog Window (partial view)

Gstart window

This window enables you to specify one or more hexadecimal strings that are placed at the beginning of each record of graphics data.

click to expand
Figure 31.10: The Gstart Window (partial view)

Gend window

This window enables you to specify one or more hexadecimal strings that are placed at the end of each record of graphics data.

click to expand
Figure 31.11: The Gend Window (partial view)

Host File Options window

This window controls the output destination and formatting of the data stream produced by the driver. (Most of these values can also be specified with the GOPTIONS statement and with the FILENAME statement. See also Exporting SAS/GRAPH Output with Program Statements on page 62.)

click to expand
Figure 31.12: The Host File Options Window

Host Commands window

This window stores the host commands issued at driver initialization, before and after each graph is produced, and at driver termination. These commands are typically used to send graphics output to a hardcopy device such as a printer or a plotter.

click to expand
Figure 31.13: The Host Commands Window

Creating or Modifying Device Entries

In order to add, modify, or delete device entries, you must have write access to the catalog. On multi-user systems, the SAS support consultant is usually the only person who has write access to the SASHELP.DEVICES catalog and can make any changes. Therefore, when creating new entries or modifying existing ones, individual users usually work in a personal catalog. Be sure the catalog in which you store new or modified device entries is named DEVICES.

To use a device entry stored in a personal catalog, you must assign the GDEVICE n libref to the library that contains the device catalog. See About Device Catalogs on page 916.

It is a good idea to give a new or modified device entry a name that is different from the original. Then, if you want to use the original device, SAS/GRAPH can find that device when it searches the device catalogs. Remember that SAS/GRAPH searches the GDEVICE n libraries before it searches SASHELP.DEVICES and uses the first device it finds whose name matches the one you have specified. (See Search Order of Device Catalogs on page 917.)

For example, suppose there is a customized copy of PSCOLOR in your GDEVICE0.DEVICES catalog as well as the original in SASHELP.DEVICES. If you specify DEV=PSCOLOR and if the libref GDEVICE0 is assigned, SAS/GRAPH will search GDEVICE0.DEVICES first and use the copy of PSCOLOR stored there. Unless you cancel the GDEVICE0 libref, SAS/GRAPH will never find the original in SASHELP.DEVICES.

Creating a New Device Entry

Typically you create a new device entry by copying an existing device and modifying its parameters to suit your needs. You can copy and modify a device entry in two ways:

  • Use the DIR command on the command line to open the DIRECTORY window, and then use the COPY command to make a copy of an existing device entry. Then edit the new entry and modify its parameters. The existing device entry can be from any catalog. (See the SAS Help facility for information on using GDEVICE windows and commands.)

  • In program mode, use the COPY statement to make a copy of the device entry and use the MODIFY statement to change the parameters (see Example 1 on page 936).

If you want to start with a blank device entry and fill in values for the parameters, use the EDIT command from the DIRECTORY window or use the ADD statement with program mode PROC GDEVICE.

With either method, you must provide values for the parameters listed in Required Arguments on page 923. If you copy and modify an existing entry, all the required parameters will already have values. If you create a new entry with GDEVICE windows, you are prompted to fill in the appropriate fields.

Note: When you change a field in an Institute-supplied device entry (either the original device entry in SASHELP.DEVICES or a copy), SAS/GRAPH software asks whether you really want to change the entry. Answer Y to change the entry or N to cancel the operation.

Modifying an Existing Device Entry

Typically, you modify an existing device entry when you want to change the device parameters permanently in order to customize a device entry. The process is similar to creating a new entry in that you usually begin by copying the entry you want to modify into your personal catalog and making the changes there. See Example 1 on page 936 for an example of creating a custom device entry.

Changing Device Parameters Temporarily

You can change some device parameters temporarily by overriding their settings with graphics options in a GOPTIONS statement. In this case, the settings remain in effect until you change them or end your SAS session. For details, see Overriding Device Parameters Temporarily on page 46.




SAS.GRAPH 9.1 Reference, Volumes I and II
SAS.GRAPH 9.1 Reference, Volumes I and II
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 342

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net