GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Device support in application programs

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



Many programs can be written without much knowledge of the way GDDM supports different devices but you need to understand it to perform the following tasks:

  • Defining a device's characteristics to GDDM
  • Sending output to a device other than the end user's terminal
  • Copying output from the main display to a printer or plotter
  • Communicating with more than one device
  • Saving a data stream suitable for subsequent output on a different device
  • Specifying device-dependent or subsystem-dependent processing options
    
    
As explained in "Hierarchy of GDDM concepts" in topic 7.0, the device is at the top of the hierarchy. Any graphics, alphanumeric, or image objects that your program puts on the GDDM page belong to the device that is current when the page is created. This means that before your program creates any objects, it must tell GDDM to which device they belong and must be sent as output. You can do this by issuing a pair of calls in your program; first a DSOPEN call and then a DSUSE.

With the DSOPEN call, you define for GDDM a conceptual device to which your application can later send its output.

With the DSUSE call, you can supply a device identifier from an earlier DSOPEN call, to use that device as the current primary or alternate device. All subsequent alphanumerics, graphics, and image calls apply to that device until a new device is made current. Your program's output is created for the current device with respect to its definition on the DSOPEN call.

There is generally no need for explicit device control when the output is to appear on the invoking terminal. The current device defaults to the invoking device - called the user console. For the default device, GDDM issues an internal DSOPEN.

If you want your application to use a device other than the invoking terminal, you must explicitly open that device using a DSOPEN call. If you want to use the invoking terminal, but in a nonstandard way, you can issue an explicit DSOPEN call associated with the physical address of the user console or modify the internal DSOPEN with a nickname statement (see "Coding a partial device definition for end users to change with nicknames" in topic 18.1.2).

Subtopics:

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012