If a process is behaving abnormally, you might want to invoke a program dump for the process. You can use the dump later to help debug the process.
One way you can invoke a dump is by using the DUMP (Dump Memory) system command. The <mix number> DUMP form of this command initiates a program dump for the specified process. The <mix number> DUMP <option list> form of this command assigns dump-related options to the OPTION task attribute and then initiates a program dump. The OPTION values are retained, and they affect any later program dumps for the process, unless overridden by later assignments. The following example dumps information about arrays and files for a process with the mix number 3457:
3457 DUMP ARRAYS, FILES
It is possible to view the program dump while the process is still running. Refer to Analyzing a Program Dump from a Running Process later in this section.
You can also trigger a dump by way of the DS (Discontinue) system command. The <mix number> DS <option list> form of this command initiates a program dump and discontinues the process. The option list in this command controls the contents of the dump by assigning options to the OPTION task attribute. The following example dumps arrays and code segments and discontinues the process with mix number 3457:
3457 DS ARRAYS, CODE
Note that the simple form of the DS command, <mix number> DS, causes a program dump if the DSED option of the OPTION task attribute was previously set through object code file assignments, task equations, or task attribute assignments executed by the process. You can prevent such a dump from occurring by using the <mix number> DS NONE form of the DS command.
A program dump requested by the DUMP system command might not be taken immediately if the process is running at a low priority or is in an MCP service routine. For example, if the process is waiting on an event, the program dump is not taken until the wait completes.
Furthermore, if an operator uses a DS command to discontinue the process while a program dump is pending for the process, then the program dump might not be taken at all. The DS command causes the pending program dump to be taken only if at least one of the following conditions is true:
-
The DSED option of the OPTION task attribute is set.
-
The previous DUMP command specified the DSED option.
-
The DS command specifies one or more dump options.

