GDDM V3R2 Base Application Programming Guide
|
Previous topic |
Next topic |
Contents |
Index |
Contact z/OS |
Library |
PDF |
BOOK
Points illustrated by the SCREEN2 program GDDM V3R2 Base Application Programming Guide SC33-0867-01 |
|
This example shows a number of considerations that are peculiar to a program using two different primary devices. Duplicate identifiers: The statements marked A both define fields with an identifier of 2. This is not an error or conflict of any sort, because the fields belong to different pages (and also to different devices). The device is at the head of the hierarchy. Each device has its own set of pages, each with their own graphics and alphanumerics. The rules about not using the same identifier twice apply only within the next highest element in the hierarchy. For example, your first device can have a page with identifier 5; so can your second device. One of a device's pages may have an alphanumeric field with identifier 32; so may another such page. Viewport matching window: To ensure that the grapefruit is circular, the aspect ratio of the window must match that of the viewport. This is done in the statements marked B by setting a square picture space (and therefore a square viewport), and by using a window of 20 units in each direction. Default primary device: Just after the DSDROP of device 15, GDDM meets an ASCPUT call D . As there is no current primary device at that time, GDDM assumes that the default device should be used (as it did at the start of the program). The user console is already open, so GDDM issues just an internal DSUSE to make the user console the current primary device again. Scope of symbol sets: The scope of a symbol set is the device. This means that the application program must load a separate symbol set for each device, even if the loads are of the GSLSS type. In the example, the 64-color pattern set has to be loaded twice (once for each device) at C . You may load a vector symbol set for one device and give it an identifier of 194. You may then load a different vector symbol set for another device and give it the same identifier of 194. Although this is not an error, using a different identifier would make the program more easily understandable. Enlarging window to shrink the graphics: The subroutine GRAPE_FRUIT draws the fruit within the coordinate ranges x:0 through 20, y:0 through 20. When the window itself has these ranges, the subroutine's output fills the viewport. If the subroutine is reexecuted under a larger window as defined at E , the output fills correspondingly less of the viewport. In the last section of the program, the grapefruit is redrawn in the central quarter of the viewport. |
Copyright IBM Corporation 1990, 2012 |