Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide


6.1.2 Debugging with the CUI (UNIX only)

If you execute the adshexec command with the -d option specified, the job controller starts in the debugger mode, enabling you to use CUI operations to debug job definition scripts. To use commands in the execution environment to debug batch jobs, you enter the adshexec command as shown below. Enter the command from the UNIX shell.

adshexec -d /script/batchjob2.ash

For details about the adshexec command, see adshexec command (executes a batch job) in 8.3 Shell operation commands.

The following figure provides an overview of debugging.

Figure 6‒2: Overview of debugging (CUI)

[Figure]

  1. The adshexec command with the -d option specified is entered to start the debugger.

  2. The break command is entered to set a breakpoint.

  3. The run command is entered to run the job definition script, which stops at the breakpoint.

  4. The continue command is entered to continue execution from the breakpoint.

  5. The kill command is entered to terminate the job definition script.

  6. The quit command is entered to terminate the debugger.

Organization of this subsection

(1) Output

To run job definition scripts interactively, JP1/Advanced Shell displays the standard output and standard error output on the console at suitable times during debugging execution, unlike during normal execution where the standard output and standard error output are output after execution has completed. The files for the standard output and the standard error output are not created in the spool job directory.

During normal execution, job execution logs are output to the standard error output after job definition scripts have been completed. During debugging, information equivalent to the job execution logs is output to the standard error output.

(2) Initialization of information

When a job definition script is run by entering the run command after already having been run once from execution of the run command, the following information that was specified during the previous execution is initialized:

The following information is inherited until the debugger terminates:

(3) Spool

During CUI debugging, JP1/Advanced Shell creates two types of spool job directories, one type for the debugger and one type for the job definition scripts executed as a result of entering the run command. In each debugging execution, JP1/Advanced Shell creates one spool job directory for the debugger and one spool job directory each time the run command is executed. This subsection explains the spool job directories for the debugger and for job definition scripts.

(a) Debugger

Job definition scripts are not executed in the spool job directory for the debugger. JP1/Advanced Shell creates a spool job directory that stores in a management file the number of job definition scripts executed during a single debug execution and that stores files containing the debugger's internal data.

The following are the files that JP1/Advanced Shell stores in the spool job directory for the debugger:

  • Script images: Contents of the scripts that were run

  • Job execution logs: JP1/Advanced Shell messages (including the pids of created processes)

  • Breakpoint information (.DBG): Debugger internal data

  • sysout management file (.sysout)

(b) Job definition scripts

JP1/Advanced Shell creates a spool job directory each time the run command is executed in which it stores the following files:

  • Script image: Contents of the script image that was run

  • Job execution logs: JP1/Advanced Shell messages

  • Output files: Files created by executing the #-adsh_spoolfile command

  • sysout management file (.sysout)

(4) Notes

If [[conditional-expression]] is used for conditional or if multiple commands are joined by a pipe, the E-Time entry in an execution result message might be the debugger's processing time.