Chapter Contents |
Previous |
Next |
The GDEVICE Procedure |
About Device Catalogs |
Custom device entries are typically stored in a catalog
named GDEVICEn.DEVICES (where n
can be any number from 0 to 9). However, device entries that have been created
or modified by a system administrator specifically for your site also may
be stored in SASHELP.DEVICES. (On multi-user systems, the SAS Support Consultant
is usually the person who has write access to the SASHELP.DEVICES catalog
and makes any changes.)
When the GDEVICE procedure determines which catalog it should use, it searches for the catalog in the following order:
The first catalog it finds becomes the current catalog.
You can specify the current catalog by
When you specify a device driver, SAS/GRAPH software looks only into catalogs with certain librefs and names to find a device entry for that driver. It searches these catalogs sequentially in the following order:
Since the GDEVICE0.DEVICES catalog is the first place that SAS/GRAPH software looks, you always should assign that libref to the library containing your personal catalog of device entries, if you have one. If for some reason you have personal device catalogs in more than one SAS data library, assign them librefs in the sequence GDEVICE0, GDEVICE1, GDEVICE2, and so on.
Note: As stated
above, the search for entries terminates if there is a break in the sequence;
the catalog GDEVICE1.DEVICES is not checked if the libref GDEVICE0 is undefined,
or if GDEVICE0 does not contain a catalog named DEVICES.
To cancel or redefine the libref GDEVICEn, first clear the current graphics options:
goptions reset=all;
You can then redefine the libref with another LIBNAME statement. To cancel a libref, use a null LIBNAME statement.
Ways to Use the GDEVICE Procedure |
There are two ways to use the GDEVICE procedure:
If you run SAS software in a windowing environment (the SAS Display Manager System, for example), you can use either the GDEVICE procedure windows or the GDEVICE procedure statements. In a windowing environment, the GDEVICE procedure automatically opens the GDEVICE procedure windows.
If you run SAS software in a non-windowing environment (such as line-mode or batch), you can use only GDEVICE procedure statements. In a non-windowing environment, the GDEVICE procedure automatically uses program mode.
Both methods provide identical functionality and allow
you to display or modify device parameters, or create new device entries.
proc gdevice;
This opens the DIRECTORY window in browse mode. This window lists all of the device entries in the current catalog. (See About the Current Catalog.)
From the DIRECTORY window you can select the device entry you want to work with and open other GDEVICE windows in which you can view or modify device parameters. For more information, see Using the GDEVICE Windows.
In a windowing environment, you can switch between the GDEVICE windows and program statements while you are running the procedure. See the FS Statement and the NOFS window command in the SAS Help facility for SAS/GRAPH.
To exit the GDEVICE windows, submit the End command
or close the window.
proc gdevice nofs;
By default, the GDEVICE procedure accesses the current catalog in browse mode and prompts you in the LOG to enter additional program statements. (See About the Current Catalog.) To specify the current catalog, include the CATALOG= option in the PROC GDEVICE statement.
Once you start the GDEVICE procedure, you can enter and run additional statements without re-entering the PROC GDEVICE statement. For example, the following statement generates a listing of the device parameters for the PSCOLOR device entry that is stored in the Institute-supplied catalog, SASHELP.DEVICES:
list pscolor;
PROC GDEVICE procedure output is displayed in the Output window. Sample Device Entry Listing Generated in Program Mode shows the listing generated by the LIST statement.
Sample Device Entry Listing Generated in Program Mode
GDEVICE procedure Listing from SASHELP.DEVICES - Entry PSCOLOR Orig Driver: PSCOLOR Module: SASGDPSL Model: 1251 Description: PostScript color--RGB color defs Type: PRINTER *** Institute-supplied *** Lrows: 0 Xmax: 8.500 IN Hsize: 8.000 IN Xpixels: 2550 Lcols: 0 Ymax: 11.000 IN Vsize: 8.500 IN Ypixels: 3300 Prows: 68 Horigin: 0.218 IN Pcols: 80 Vorigin: 1.496 IN Aspect: 0.000 Rotate: Driver query: Y Queued messages: N Paperfeed: 0.000 IN OPTIONS Erase: Autofeed: Y Chartype: 1 Swap: Cell: Maxcolors: 256 Autocopy: Characters: Repaint: 0 Handshake: XONXOFF Circlearc: Gcopies: 0 Dash: Gsize: 0 Prompt - startup: Fill: Speed: 0 end graph: Piefill: Fillinc: 0 mount pen: Polyfill: Maxpoly: 1450 chg paper: Symbol: Lfactor: 0 Pensort: N Promptchars: '000A010D05000000'X Devopts: 'FD9230402C130000'X UCC: '0001'X Cback: WHITE Color list: BLACK RED GREEN BLUE CYAN MAGENTA YELLOW GRAY CHARTYPE RECORDS Chartype Rows Cols Font Name Scalable 1 89 85 Courier Y 2 89 85 Courier-Oblique Y . {ob ...more hardware fonts...} . 34 89 85 Bookman-LightItalic Y 35 89 85 Bookman-DemiItalic Y Gend: '0A'X FILE INFORMATION Gaccess: sasgastd>sasgraph.ps Gsfname: Gsfmode: PORT Gsflen: 0 Trantab: Devmap: Devtype: DISK Gprotocol: Fileclose: DRIVERTERM Hostspec: HOST INFORMATION |
You can exit the GDEVICE procedure in these three ways:
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.