GDDM V3R2 Base Application Programming Guide
|
Previous topic |
Next topic |
Contents |
Index |
Contact z/OS |
Library |
PDF |
BOOK
Task management GDDM V3R2 Base Application Programming Guide SC33-0867-01 |
|
The "Example: Program using two operator windows" in topic 22.2.2 showed how a single GDDM application could use windowing in its dialog with the terminal user, to present separate functions of the application, each in an operator window. You may recall that the application used the DSOPEN call to open the real device, and two WSCRT calls to open two operator windows. A subroutine was then called for each window. The subroutine contained a DSOPEN, that opened a virtual device for each operator window. You can use the same windowing principles to write your own task manager program. The GDDM-supplied example task manager (ADMUTMT for TSO, ADMUTMV for VM/CMS) is an example of such a program. The task manager uses DSOPEN to open the real device, and WSCRT and the other windowing calls to create and control an operator window for each application program. Subsequent DSOPEN calls in each application program open one or more virtual devices, which are associated with the operator windows created by the task manager. This is illustrated in Figure 133.
The task manager manages the display device screen and other resources. In addition, the task manager must either use the task-management facilities of the operating system, or use its own pseudotasking facilities (TSO has full task-management facilities but CMS does not). The system tasking or pseudotasking executes each program in a separate sub-task. GDDM enables several application programs to share the screen by allowing the task manager to intervene in the execution of the program's input/output calls. When each operator window is created, the task manager specifies (in the first array element of the last parameter of the WSCRT call) the address of a coordination exit routine. This runs in the application program subtask, and is invoked by GDDM whenever the application calls a function that requires input/output for the terminal-an ASREAD call, typically, as shown in Figure 134.
The numbers in the figure represent the following events:
The purpose of the coordination exit routine is to switch control from the subtask to the main task, or the other way round. There is a direction parameter to tell it which way to switch. Subtopics: |
Copyright IBM Corporation 1990, 2012 |