SAS.GRAPH 9.1 Reference, Volumes I and II
Overview
This chapter contains detailed descriptions of each command used in the DATA Step Graphics Interface (DSGI).
The following commands are associated with DSGI:
-
utility functions
-
GINIT
-
GPRINT
-
GTERM
-
-
GASK routines
-
GDRAW functions
-
GRAPH functions
-
GSET functions
Each routine or function is followed by an alphabetical listing of the operators used with it. For each operator, this chapter provides the statement syntax, other argument definitions, and notes about using the functions and routines, operating states, and return codes. Operating states are summarized in Operating States on page 1359.
The syntax for all routines and functions contains the argument return-code-variable . This argument must be a numeric variable name and can be a different variable name for each routine.
The return-code-variable argument is used to debug DSGI programs. It contains the return code of the routine or function call. If the return code is any value other than 0, the routine or function did not execute properly.
Each routine and function has a different set of possible return codes. The return codes are listed in the heading for the routine or function. Refer to Return Codes for DSGI Routines and Functions on page 1501 for an explanation of the return codes.
Operating States
This list summarizes the operating states in DSGI. For a detailed discussion of operating states, see Operating States on page 1359.
GKCL | facility closed, initial state of DSGI. |
GKOP | facility open. DSGI is open . You may check the settings of attributes. |
SGOP | segment open. Graphics output can be generated. |
WSAC | workstation active. You can issue DSGI statements. |
WSOP | workstation open. The graphics catalog is opened or created. |
Utility Functions
Utility functions enable you to initialize a session for DSGI, print error messages, and terminate the session.
GINIT
Initializes DSGI
Operating States: GKCL
Return Codes: 0, 1, 26, 301, 307
Resulting Operating State: WSAC
Syntax
return-code-variable =GINIT();
Description
The GINIT function performs three functions: it readies the library that contains SAS/GRAPH graphics routines, it opens a workstation, and it activates it. A workstation is a Graphics Kernel Standard (GKS) concept. GKS allows for multiple workstations to be open at the same time; however, for DSGI applications, you always use exactly one workstation. This function moves the operating state from GKCL to WSAC.
See Also
-
GTERM on page 1403
GPRINT
Prints the specified interface error message
Operating States: All
Return Codes:
Syntax
return-code-variable =GPRINT( code );
Description
The GPRINT function displays the message that corresponds to the error code entered. You can use this routine if you have disabled automatic error logging but still want to display the message associated with a return code you have received.
Argument Definitions
code | numeric constant or numeric variable name; should be the value of a return code received from some previous function. |
See Also
-
MESSAGE on page 1485
GTERM
Terminates DSGI
Operating States: WSAC
Return Codes: 0, 3
Resulting Operating State: GKCL
Syntax
return-code-variable =GTERM();
Description
The GTERM function performs three functions: it deactivates the workstation, closes the workstation, and closes the library that contains SAS/GRAPHroutines. This function should be issued to free memory allocated by DSGI. This function moves the operating state from WSAC to GKCL.
See Also
-
GINIT on page 1402