Previous | Contents | Index |
You can remove breakpoints at any time during a debugging session with the CANCEL BREAK command. For example:
ACMSDBG> CANCEL BREAK VR_RESERVE_CAR_TASK\$BEGIN |
To remove all breakpoints in a task or in all tasks for the task group that you are debugging, use the /ALL qualifier. For example:
ACMSDBG> CANCEL BREAK /ALL=VR_RESERVE_CAR_TASK |
This command removes all breakpoints in VR_RESERVE_CAR_TASK. If you do
not include a task name in the /ALL qualifier, the command removes all
breakpoints in all tasks.
7.3.5 Running a Task in the ACMS Task Debugger
To start a task you want to run, use the SELECT command. For example:
ACMSDBG> SELECT VR_RESERVE_CAR_TASK |
The name you use in the SELECT command must be the name of the task in the task definition. For example:
REPLACE GROUP VR_TASK_GROUP . . . TASKS ARE RESERVE_CAR : TASK IS VR_RESERVE_CAR_TASK; |
If a task uses information entered as part of the selection string, you can include this information as part of the SELECT command. For example:
ACMSDBG> SELECT DISPLAY_EMPLOYEE JONES |
In this example, the Display Employee task expects an employee name to be passed to it in the ACMS$SELECTION_STRING workspace. If you enter a name after the task name, ACMS moves the name into the ACMS$SELECTION_STRING workspace and passes it to the task. For further explanation of the use of selection strings, see Compaq ACMS for OpenVMS Writing Applications.
When you use the SELECT command, select only one task at a time. If you have selected a task and it is still running, use the CANCEL TASK command to stop the current task before starting another one:
ACMSDBG> CANCEL TASK |
The CANCEL TASK command does not take any parameters or qualifiers. It always stops the current task, if there is one. If the task has context in a server when it is canceled, and if there is a cancel procedure defined for the server, the cancel procedure runs. If there is a cancel action defined for the task, that action is performed after the server cancel procedure, if any, runs.
When you select a task, the ACMS Task Debugger starts the task. Once
the task reaches the first breakpoint, you can enter commands to
continue running the task, display the contents of workspaces, change
the contents of workspaces, or display information about ACMS Task
Debugger commands.
7.3.6 Checking Values in Workspaces
You can use both the ACMS Task Debugger and the OpenVMS Debugger to check values in workspaces.
Use the ACMS Task Debugger to check the following workspace values:
The following sections explain how to check the workspace values listed
above.
7.3.6.1 Checking Initial Values
Use the EXAMINE command to check the initial value of a workspace field. For example:
ACMSDBG> EXAMINE CHECKOUT_SITE_ID OF VR_VEHICLE_RENTAL_HISTORY_WKSP CHECKOUT_SITE_ID of VR_CHECKIN_TASK\VR_VEHICLE_RENTAL_HISTORY_WKSP: 0 |
In this example, the initial value of the CHECKOUT_SITE_ID field is 0.
You can also examine the initial contents of an entire workspace. For example:
ACMSDBG> EXAMINE VR_VEHICLE_RENTAL_HISTORY_WKSP VR_CHECKIN_TASK\VR_VEHICLE_RENTAL_HISTORY_WKSP VEHICLE_ID: +0 CHECKOUT_SITE_ID: +0 RESERVATION_ID: +0 . . . |
To continue running the task after you check an initial workspace
value, enter GO after the ACMSDBG> prompt. The GO command tells the
Task Debugger to run the task until it reaches the next breakpoint.
7.3.6.2 Checking Entered Values
As you debug a task, exchange and processing steps store new data in workspace fields. At breakpoints in the task, you can use the EXAMINE command to examine the contents of workspaces to determine whether the task is functioning correctly. For example:
ACMSDBG> EXAMINE CHECKOUT_SITE_ID OF VR_VEHICLE_RENTAL_HISTORY_WKSP CHECKOUT_SITE_ID of VR_CHECKIN_TASK\VR_VEHICLE_RENTAL_HISTORY_WKSP: 1 |
You can also examine the contents of an entire workspace. For example:
ACMSDBG> EXAMINE VR_VEHICLE_RENTAL_HISTORY_WKSP VR_CHECKIN_TASK\VR_VEHICLE_RENTAL_HISTORY_WKSP VEHICLE_ID: +2 CHECKOUT_SITE_ID: +1 RESERVATION_ID: +26 . . . |
In this example, reservation 26 was correctly retrieved from the VEHICLE_RENTAL_HISTORY relation in the AVERTZ database. In this case, the car was rented from site number 1.
While debugging a task, you might find that a workspace does not contain the data you expect. When you encounter such a problem, check that:
You can check the contents of the ACMS$PROCESSING_STATUS workspace by using the EXAMINE command. Using the EXAMINE command, you can make sure that the workspace message field contains the correct message and that the correct error codes are loaded into ACMS$T_STATUS_TYPE.
You can use the EXAMINE command to check that a procedure did what was expected. For example, if a read was successful, a workspace should contain a value, and the ACMS$T_SEVERITY_LEVEL field of the system workspace should contain the value S, showing that the process was successful:
ACMSDBG> EXAMINE ACMS$T_SEVERITY_LEVEL ACMS$T_SEVERITY_LEVEL OF VR_RESERVE_CAR_TASK: S |
For a detailed discussion of the ACMS$PROCESSING_STATUS workspace, see
Compaq ACMS for OpenVMS Writing Applications.
7.3.7 Debugging Transaction Timeout Code
In an ACMS application definition, you can specify a time limit within which a distributed transaction must complete. If the transaction does not end within the specified number of seconds, ACMS rolls back the transaction.
You can use the following commands to test that a task handles transaction timeout errors correctly:
By default, there is no transaction time limit. Chapter 10 contains
reference information about these commands.
7.3.8 Stopping the Task Debugger
Use the EXIT command or [Ctrl/Z] at the ACMSDBG> prompt to exit the Task Debugger and return to the DCL command-level prompt:
ACMSDBG> EXIT $ |
If you exit the Task Debugger while server processes are still active, these servers are stopped. If the server has a termination procedure defined for it, the termination procedure is executed.
If there is some reason that you do not want the server's termination
procedure to run, you can set a breakpoint at the termination
procedure. When you reach the breakpoint, use the EXIT command at the
OpenVMS Debugger prompt to cause the server process to exit without
executing the termination procedure.
7.4 Using the OpenVMS Debugger
Section 7.3 explains how to use the ACMS Task Debugger to debug the steps in a task. This section explains how to use the OpenVMS Debugger to debug server procedures. Transfer control to the OpenVMS Debugger in a server process in one of the following ways:
Once you display the DBG> prompt, you can debug your procedure as you debug procedures in any standalone program. You can enter any of the OpenVMS Debugger commands that are valid for the language used. There are, however, situations in which the OpenVMS Debugger behaves differently when you use it in an ACMS environment.
Following are details that are specific to using the OpenVMS Debugger in an ACMS environment:
For more information on how to set, display, and change breakpoints,
see the OpenVMS Debugger Manual. For features specific to a language, see the
user's guide for that language.
7.5 Returning to the ACMSDBG> Prompt
In the process of debugging a task definition and server procedures, you might want to use an ACMS Task Debugger command, but you cannot because you are not at the ACMSDBG> prompt. Following are situations in which you might want to display the ACMSDBG> prompt:
Use [Ctrl/G] to display the ACMDBG> prompt in all of these situations.
In versions of ACMS prior to Version 3.2, you use [Ctrl/C] to display the ACMSDBG> prompt. |
Users who have written their own command process, called an agent program, must not only debug their ACMS task definitions and the high-level language step procedures called from the task definition, but also debug the flow of control between an agent program and an ACMS task.
When you debug a conventional ACMS task, the task and the task submitter both execute in the same Task Debugger process, and you have your choice of debugging using one or two terminals. However, when you debug a task called by a user-written agent program, you must debug both the task and the agent program at the same time. Because an additional process is running, you must allocate a terminal to each process. One process runs the agent program, whose only job is to select ACMS tasks. The other process runs the ACMS Task Debugger and performs the usual debugging functions, including:
These task debugging functions are described in Section 7.2.5 and Section 7.3.
The agent program and the ACMS Task Debugger must run on the same node. |
The processes running the agent program and the Task Debugger require special consideration during debugging. Before debugging, set up so that the agent program selects the task in the ACMS Task Debugger rather than in an ACMS application. Follow these steps to debug tasks that are submitted by agent programs:
$ SHOW DEV/FULL TT |
$ SET PROT=W:RW/DEV TT |
$ ACMS/DEBUG/AGENT_HANDLE=VR_26200E49 VR_TASK_GROUP ACMSDBG> |
ACMSDBG> ACCEPT |
ACMSDBG> ACCEPT/CONTINUOUS |
$ DEFINE ACMS$DEBUG_AGENT_TASK Y |
$ DEFINE VR_APPL VR_26200E49 |
Previous | Next | Contents | Index |