The DS (Discontinue) command terminates specified jobs and tasks. It has no effect on a process that has been locked by the LP (Lock Program) command.
Syntax

<option list>

Explanation
<mix number list> DS
<mix number> DISCONTINUE
Terminate the jobs and tasks specified by the mix number list.
<option list>
If a program has been started, the following options, if specified in the option list, control a program dump taken at the time of termination.
Option |
Description |
---|---|
* (asterisk) |
Combines options already set by the task with options specified in the command; the net result controls the program dump. |
ALL |
Causes a program dump with all options set. |
NONE |
Resets all program dump options. If no other options are specified in this command, no program dump is performed. |
DSED |
Forces a program dump with options already set by the task (if used with *) or with the default options (if used without *) plus any other options set in this command. |
BASE |
Dumps the base of the stack (used by the operating system) and the process information block. |
ARRAYS |
Dumps the arrays. |
PRESENTARRAYS |
Dumps only present arrays. If the ARRAYS option and the PRESENTARRAYS option are both specified, then all arrays are dumped. |
CODE |
Dumps all code segments. |
CRITICALBLOCK |
Causes any program dumps to include the stack that contains the critical block of the dumping stack. If the stack is a job stack, it is not dumped. The stack is dumped from the top of the environment that contains the critical block or from the base of the frozen environment of a library or database stack, whichever is higher. |
FILES |
Dumps all areas used by files. |
DBS |
Dumps database stacks. |
LIBRARIES |
Dumps library stacks. |
PRIVATELIBRARIES |
Dumps only private library stacks. If LIBRARIES is also set, the system dumps all libraries. |
TODISK |
Causes any program dumps taken by the process to be directed to a disk file. If TOPRINTER is also set, the system directs the dump both to the printer and to disk. |
TOPRINTER |
Causes any program dumps taken by the process to be directed to the task file. The INTNAME of this file is TASKFILE, and the default KIND is PRINTER. If TODISK is also set, the system directs the dump both to disk and to the printer. |
You can verify that the system is executing the program dump by entering the Y (Status Interrogate) command.
For details about the effects of the TODISK and TOPRINTER options, refer to the Task Attributes Programming Reference Manual.
If the asterisk (*) is not specified, all the dump options are reset, except those explicitly specified in the command.
On a system with the Secure Access Control Module security enhancements or with the Security Accountability Facility, when the PROGDUMPFILTER option is set, a dump taken TOPRINTER contains only the data belonging to the environment of the dumping program. The data in a dump taken TODISK is filtered to display only the data belonging to the environment of the dumping program, unless the dump is analyzed by a privileged user or process.
For more information on the DS command, refer to the ??DS (Discontinue) primitive command.
Examples
Example 1
3132 DS
3132 OPERATOR DSED @ 002:001D:1
Example 2
If you enter a DS command and the system replies that the program is locked, check to make sure that you used the correct mix number and that the task really should be discontinued. Then use the <mix number> LP − command to unlock the task. Then reissue the <mix number> DS command.
4352 DS
PROGRAM IS LOCKED
4532 LP -
4532 NOT LOCKED
4532 DS
4532 OPERATOR DSED @ (01200300)
Considerations for Use
In rare cases, a discontinued task might not terminate. To resolve this situation, halt/load the system.
A PROGRAMDUMP (caused by the DS command) might take a significant amount of time to complete depending on the relevant dump options, how large the program is, or other factors.
Some tasks, including tasks that access Enterprise Database Server databases, might execute exception or epilog procedures when the DS command is applied. These procedures could release locks the task held at the time the DS command was applied. These procedures might take time to complete, or they might have a problem, preventing completion.
Note: | In this case, a second DS command can cause the task to terminate. Prematurely entering the second DS command could cause other tasks to malfunction. |
If a discontinued task does not terminate and the CONTROLLER is functioning normally, subjecting the task to ??DS (the primitive form of the DS command) is no more likely to result in task termination than a nonprimitive DS command.
If a discontinued task does not terminate because one or more dependent tasks will not terminate, the discontinued task will appear in the waiting entries with the following message:
WAITING FOR n TASKS TO TERMINATE: <mix number list>
If you attempt to discontinue a task that is running an isolated procedure from another task or library, and the task being discontinued has already been discontinued or is waiting on a systemwide ASD or event shortage, the following message is displayed:
Action delayed: Task is running ISOLATED code