GDEVICE Procedure

Creating or Modifying Device Entries

Write Access, Personal Catalogs, and Device Entry Names

In order to add, modify, or delete device entries, you must have Write access to the catalog. On multi-user systems, your site administrator 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 GDEVICEn libref to the library that contains the device catalog. See Device Catalogs.
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 GDEVICEn libraries before it searches SASHELP.DEVICES and uses the first device that it finds whose name matches the one you have specified. (See Search Order of Device Catalogs.)
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 the libref GDEVICE0 is assigned, SAS/GRAPH searches GDEVICE0.DEVICES first and uses the copy of PSCOLOR. Unless you cancel the GDEVICE0 libref, SAS/GRAPH will never find the original device entry in SASHELP.DEVICES. (To include SASHELP.DEVICES in the search path, you would need to cancel the GDEVICE0 libref.)

Creating a New Device Entry

Typically, you create a new device entry by copying an existing device and modifying its parameters to meet your needs. You can copy and modify a device entry in two ways:
  • Use the DIR command to open the DIRECTORY window, and then use the COPY command to make a copy of an existing device entry. Edit the new entry and modify its parameters. The existing device entry can be from any catalog. (See help for information about using GDEVICE windows and commands. You can open the help by entering Help on the command line or by selecting Helpthen selectUsing This Window. )
  • In program mode, use the COPY statement to make a copy of the device entry. Use the MODIFY statement to change the parameters. See Creating a Custom Device Entry with Program Statements.
    Note: If you copy and modify a device entry that is a Universal Printer shortcut device, then you also need to create a Universal Printer that has the same name. See Device Categories and Modifying Default Output Attributes and Configuring Universal Printing Using the Windowing Environment in SAS Language Reference: Concepts for more information.
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 provide values for the parameters listed in Required Arguments. If you copy and modify an existing entry, all the required parameters 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 a device entry that was provided by SAS (either the original device entry in SASHELP.DEVICES or a copy), SAS/GRAPH asks whether you really want to change the entry.

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 catalog entry. Copy the device entry that you want to modify into your personal catalog. Change the parameters in the new device entry. See Creating a Custom Device Entry with Program Statements 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 Style Attributes with SAS/GRAPH Statement Options and Precedence of Appearance Option Specifications. See also Style Attributes Versus Device Entry Parameters.