Your program, while operating in task mode, can establish DESERV
exits by issuing the DESERV macro with FUNC=EXIT and appropriate parameters.
Table 1. Installing or Replacing the
DESERV ExitIf EXIT_OPTION = |
then: |
and these parameters... |
---|
REPLACE |
The new exit definition replaces
the most recently defined exit. The DST (DESERV Screen Table) address
of the previously defined exit's DST is returned to the caller. |
EXIT_DST and EXIT_PREV_DSTPTR must
be specified. |
NOREPLACE (with no exit currently
existing) |
The exit definition is activated.
A value of zero is returned as the previous DST address. |
See REPLACE. |
NOREPLACE (with an exit currently
existing) |
The currently defined exit remains
the active exit. The address of the currently defined DST is returned
as the previous DST address. |
See REPLACE. |
Note: If
EXIT_OPTION=REPLACE is specified the caller must expect that a previous
DST address is returned. It is the responsibility of the caller to
replace the old DST address when eventually disabling the new exit.
Also the exit routine might need to be aware that there was a previous
exit defined, and might choose to invoke the previously defined exit.
|
EXIT_DST defines the DST address. The DESERV FUNC=EXIT caller owns
and manages storage for the DST. The DST can be encapsulated inside
other application managed control blocks. This can help the exit routine
determine the context of the application in which it was called. When
the DST is used with a task level exit, the DST_FLAGS_PROP bit can
be set on to indicate that this DST should be propagated to tasks
that are attached by this task. The propagate function is not supported
for the global exit. The format of the DST is shown in Table 2.
Table 2. DESERV
Screen Table StructureOffset |
Length or Bit Pattern |
Name |
Description |
---|
0 (X'0') |
20 |
DST |
(structure) |
0 (X'0') |
16 |
DST_HEADER |
(character) |
0 (X'0') |
8 |
DST_ID |
Eyecatcher 'IGWDST' (character) |
08 (X'08') |
4 |
DST_LEN |
Length of DST |
X'14' |
DST_LEN_IV |
Constant to be used with DST_LEN |
12 (X'0C') |
1 |
DST_LEV |
Control block level (unsigned) |
X'01' |
DST_LEV_IV |
Constant to be used with DST_LEV |
13 (X'0D') |
1 |
DST_FLAGS |
DST flags (unsigned) |
xxxx xxx. |
- |
Reserved |
.... ...1 |
DST_FLAGS_PROP |
Propagate this DST to lower level tasks |
14 (X'0E') |
2 |
DST_RES |
Reserved |
16 (X'10') |
4 |
DST_EXIT |
Address of exit routine screen table (address) |
EXIT_PREV_DSTPTR returns the address of the DST that was defined
prior to this DESERV FUNC=EXIT call.