Running and displaying command script files (scripts)

You can run a script of commands (also referred to as scripts and command script files) in either of two ways:
  • Using the Run Script function from the File menu. See File menu for more information.
  • Using the console window, which is discussed in this section.
From the console window you can run a series of commands in a command script file unconditionally from beginning to end or pause at strategic points as the script runs. There are two types of script formats:
  • .FIL
  • .TDR.

The console.syncscriptview console configuration option determines how you view command script files. See Console configuration for information about console configuration options.

Figure 1 shows a loaded command script file (the command script file view in the left navigation of the console window) that is ready to run. Each command in the command script file is visible. The header of the loaded command script file just below the menu options shows the name of the command script file that you loaded and intend to run. In this figure, the name of the command script file is bsszdmap.tdr. The list of commands contained in that command script file is just below its file name.

Figure 1. TPF Operations Server console window with loaded command script
This figure shows a loaded command script file as described in the text preceding the figure.

Command list description in the command script file view

Each line in the command list contains the following information:

Check box
The check box indicates that a pause action is to take effect. A check placed in the check box with your mouse indicates that the command script file is to pause just before running the command that you selected.
Note:
  1. As the command script file runs and before it reaches the checked command, you can clear the check box by clicking the check box with your mouse to cancel the pausing point and allow the command script file to run without pausing.
  2. Selecting multiple check boxes is not allowed. Only one selection is allowed in the command list; however, you can move the check mark from any check box to any other by selecting the check box that you want.
Bracketed Index
The second column in each line of the command script file contains the exact line number in brackets of the command as it is represented in the .FIL or .TDR script format that you have loaded.
Body of Command
Following the bracketed line number is the body of the command as it is shown in the .FIL or .TDR script format. The width of the viewable area determines how much of the command you can see. You can see the full representation of each command by either adjusting the vertical separator bar to expand the script view area or by moving your mouse pointer over the entry of interest. With the mouse in this position, the entire contents of the command are displayed for your review. For commands in a .TDR script format, information is displayed in the following format:
[<line number>] <command>; E: <expected result string>, ...,;
LU <locally unexpected result string>, ...,; T: <timeout value,
in seconds>; TC: <timeout value, in seconds>
Note: For the .TDR script format, you display globally unexpected result strings by moving your mouse pointer over the file name of the loaded command script file.
Highlighting
You can highlight each line in the command list clicking the entry with your mouse. Highlighting a command entry identifies it as the command to start running when the Run button is clicked or when that entry is double-clicked with your mouse.

If a command script is running and you click the Pause button or enter the !pause command, the next command in the command script file that has not run is highlighted and its check box is selected. The checked command is the next one to run when you click Run, enter the !resume command from the command line, or double-click the checked entry.

Buttons in the command script file view

The Edit Parameters button is located at the top of the command script file view. If a loaded command script file contains variable parameters and is not currently running, you can access and change the values of these variable parameters by clicking the Edit Parameters button to display the Script Parameters dialog box. The Edit Parameters button is not available if the loaded command script file does not contain any variable parameters.

At the bottom of the command script file view are three buttons that you can use to manage the command script file:
  • Run Button: Click Run or double-click the desired command in the list to run the command script file.
    Note:
    1. The command script file script does not run immediately after you have loaded the correct .FIL or .TDR script format using the Load Script function from the File menu.
    2. If you are pausing your script by selecting a check box, the script pauses just before the command script file that you selected. The checked command line is highlighted to indicate that this is the command to resume at. When you click Run again (or double-click the entry), the command script file resumes running from the point of the check, and the check mark in the check box is cleared. (You can also use the !resume command to resume a command script file that was paused.)
    3. Double-click any entry in the command list to begin running the command script file at that point.
    4. As long as a command script file is not running, you can use the Load Script function repeatedly to select the appropriate .TDR or .FIL script format. Each load of a command script file negates previous loaded ones. The loaded command script file that you see in the TPF Operations Server console window is the one that runs when you click Run.
  • Pause Button: Click Pause when you want to pause the command script file. After loading the command script file, the Pause button is unavailable because the script has not initially run. Use the Pause button to pause a command script file that is running.

    The Pause button becomes active when a command script file is running. While he script runs, you can click Pause to stop the script. A check is placed in the check box for the next command that is to run and this entry is highlighted. When you click Run again (or double-click the entry selected), the check is cleared and the command script file runs to completion or until you click Pause again.

  • End Button: Click End when you want to stop a command script file that is running and remove the command list from being displayed in the GUI console.

Automated Operations

Use one of the following methods to perform automated operations:
  • Console window menu options. See Menu bar (console menu options) for information.
  • Automation program that is separately attached to the TPF Operations Server. These automation programs are set up to allow you to specify commands at the console window to control how the automation program operates. Your site will define the syntax and definitions of these commands.