GDEVICE Procedure

Ways to Use the GDEVICE Procedure

Procedure Windows versus Program Code

There are two ways to use the GDEVICE procedure:
If you run SAS in a windowing environment, 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 in line mode or batch mode, you can use only GDEVICE procedure statements. In a non-windowing environment, the GDEVICE procedure automatically uses line mode.
Both methods provide identical functionality and enable you to display or modify device parameters or create new device entries.

Running the GDEVICE Procedure in a Windowing Environment

In a windowing environment, open the GDEVICE windows by submitting the PROC GDEVICE statement without the NOFS option:
proc gdevice;
This opens the DIRECTORY window in browse mode. This window lists all of the device entries in the current catalog. (See The Current Catalog.)
To open the DIRECTORY window in Edit mode, or to specify a different catalog, include the CATALOG= option in the PROC GDEVICE statement.
From the DIRECTORY window, you can select the device entry that 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 option in PROC GDEVICE Statement.
To exit the GDEVICE windows, submit the End command or close the window.

Running the GDEVICE Procedure in Program Mode

If you are in a non-windowing or batch environment, the GDEVICE procedure automatically starts in program mode. If you are in a windowing environment, specify the NOFS option to start the GDEVICE procedure in program mode:
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 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 resubmitting the PROC GDEVICE statement. You can exit the GDEVICE procedure in these three ways:
  • submit the END, QUIT, or STOP statement
  • submit another PROC statement or DATA step
  • exit your SAS session
PROC GDEVICE procedure output is displayed in the Output window.