Analyzing a Program Dump from a Running Process

Some program dumps occur when a program is terminated, either by a fault or by a DS (Discontinue) system command. However, there can also be situations when it is useful to generate a program dump for a process while it is still running. Such a dump can be initiated by the DUMP (Dump Memory) system command or by a PROGRAMDUMP statement in the program.

By default, program dumps are directed to printer and do not print until the process and its job have terminated. The following paragraphs explain how you can gain access to the program dump while the process is still running.

One method of gaining immediate access to a program dump is by directing the program dump to disk. For information on directing dumps to disk, refer to Controlling the Program Dump Destination earlier in this section. If the program dump is directed to disk, then the dump file becomes available as soon as the dump is completed. You can then run the DUMPANALYZER utility to analyze the disk file. For a description of DUMPANALYZER, refer to the System Software Utilities Operations Reference Manual.

If the program dump is directed to printer, you can enable immediate printing by setting the PRINTDISPOSITION attribute of the task file to CLOSE. You can accomplish this assignment with a task equation in the statement that runs the program. The following is a WFL example:

RUN OBJECT/TEST/ALGOL/TASK;FILE TASKFILE(PRINTDISPOSITION= CLOSE)

Alternatively, you can assign the task file PRINTDISPOSITION through a FILECARDS task attribute assignment within the program. The following is an ALGOL example:

REPLACE MYSELF.FILECARDS BY
   “FILE TASKFILE(PRINTDISPOSITION = CLOSE);” 48”00”;

If the program dump is initiated by the DUMP command, the system closes the task file at the end of the program dump. The PRINTDISPOSITION attribute then causes the program dump to be queued for printing.

If the program dump is initiated by a PROGRAMDUMP statement in the program, the task file is not closed automatically at the end of the dump. To cause immediate printing, the program must follow the PROGRAMDUMP statement with a statement that closes the task file. The following is an ALGOL example:

CLOSE(MYSELF.TASKFILE);