Hitachi

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


6.2.24 Displaying the source file (list command)

The list command displays the source file. The abbreviation for the list command is l. The following shows the format of the list command:

When no file name is specified
list[ line-number]

When this is the first list command executed since execution stopped on the current line and no argument is specified in the command, the command displays a total of 11 numbered lines starting with the fifth line preceding the current line where execution has stopped. If this is the second or a subsequent list command entered since execution stopped, the command displays a total of 11 numbered lines starting from the line immediately following the last line displayed by the previous list command.

When a file name is specified
list job-definition-script-file-name:line-number

You can specify a job definition script file name by using a colon (:) in the argument.

If a line number is specified, the command displays 11 numbered lines starting with the fifth line preceding the specified line. The following shows the display format:

line-number: line-contents-in-source-file
...
  • line-number: Line number in the source file.

  • Line-contents-in-source-file: Contents of the indicated line in the source file.

The following describes the list command's processing.

When the list command argument is omitted

When this is the first list command executed since execution stopped on the current line, the command displays a total of 11 numbered lines in the source file starting with the fifth line preceding the current line where execution has stopped.

When this is the second or subsequent list command entered since execution stopped, the command displays a total of 11 numbered lines starting with the line immediately following the last line displayed by the previous list command.

When the list command argument is specified

If an existing line number is specified, the command displays 11 numbered lines starting with the fifth line preceding the specified line.

If a nonexistent line number or any other type of value is specified, the command outputs an error message.

Notes:
  • If you specify a file name, make sure that you specify a file that was specified in the command for executing batch jobs or in the #-adsh_script extended script command.

  • The command treats the entire character string up to the colon (:) as a file name.

  • If the source file display range would include a line with a line number less than 1, the command displays lines 1 through 11, regardless of whether the argument was specified.

  • If the source file display range would include a line beyond the last line, the command displays the last 11 lines starting with the tenth line preceding the last line, regardless of whether the argument was specified.

  • Specify 0 or a greater integer for a line number. Do not specify a plus sign (+) at the beginning.

  • If the specified line number is outside the permitted value range for int type, it is rounded to the maximum value permitted for the int type.

  • If the job definition script under debug execution is in either of the statuses listed below and the list command is executed with the argument omitted, an error results. However, once you execute the list command with the argument specified, you can display the remaining lines.

    [Figure] Execution has stopped at the end of the job definition script (EOF).

    [Figure] Execution has stopped while the trap command's action is executing.

Example of output

This example executes the list command with the argument omitted while execution is stopped on line 20.

15: echo "start"
16:
17: a=1
18: while [[ $a -ne 10 ]]
19: do
20:   echo $a
21:   let a+=1
22: done
23:
24: pwd
25: echo "end"