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.
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 enable you to initialize a session for DSGI, print error messages, and terminate the session.
Initializes DSGI
Operating States: GKCL
Return Codes: 0, 1, 26, 301, 307
Resulting Operating State: WSAC
return-code-variable =GINIT();
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.
GTERM on page 1403
Prints the specified interface error message
Operating States: All
Return Codes:
return-code-variable =GPRINT( code );
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.
code | numeric constant or numeric variable name; should be the value of a return code received from some previous function. |
MESSAGE on page 1485
Terminates DSGI
Operating States: WSAC
Return Codes: 0, 3
Resulting Operating State: GKCL
return-code-variable =GTERM();
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.
GINIT on page 1402