Notes
If you select the Macro menu from the menu bar on the Dashboard tab, a list of names of files with the extension mac will appear in the directory specified in the macrodir parameter in the BCM GUI configuration file. Selecting the CLI macro you want to run from the list displays the CLI macro execution window, as shown below.
The CLI macro table displays the contents and execution results of the CLI macro file selected from the Macro menu. The following table describes the details of the columns of the CLI macro table.
|
Column title |
Displayed item |
|---|---|
|
Line |
Line number in the CLI macro file |
|
Cliname |
Name of the CLI command to be executed |
|
Operands |
Parameters of the CLI command to be executed |
|
CLIPARMS |
Clicking (click to see) displays the CLIPARMS record of the CLI command to be executed. |
|
succ |
The line number of the line to be executed next if the CLI command ends successfully. When execution ends, End is displayed. |
|
warn |
The line number of the line to be executed next if the CLI command ends with a warning. When execution ends, End is displayed. |
|
error |
The line number of the line to be executed next if the CLI command ends abnormally. When execution ends, End is displayed. |
|
RC |
The return code of the executed CLI command |
|
Resp/Msg |
When a CLI command is executed, (click to see) appears. Clicking (click to see) displays the BCM Web API response for the executed CLI command. If the BCM Web API response is not obtained, a message will appear. |
The following table lists the buttons in the CLI macro table and describes what happens when you click the buttons.
|
Button name |
What happens when the button is clicked |
|---|---|
|
Execute |
Executes the CLI commands in the CLI macro and resumes execution if it is interrupted. During macro execution or when execution has ended, if the connection to the BCM Web API server is lost, you cannot click this button. In addition, during monitoring or if the CLI command is running from the copy group action menu or the pair action menu, an error dialog box will appear, and macro execution cannot be performed. |
|
Exit |
Closes the CLI macro execution window. |
The following table lists and describes the menus that appear in the CLI macro table. To perform step execution of the CLI command, select Interruption or End or Interruption. To perform batch execution, select No interruption.
|
Menu name |
Menu items |
|---|---|
|
After CLI success |
Select an action when the CLI command ends normally.
|
|
After CLI warning |
Select an action when the CLI command ends with a warning.
|
|
After CLI error |
Select an action when the CLI command ends abnormally.
|
Note: When continuing execution or when resuming execution after it is interrupted, the CLI command to be executed next is determined according to the end status of the executed CLI command and the line number displayed in the succ, warn, or error column. (The line number appears in the succ column if the CLI command ends normally, appears in the warn column if the CLI command ends with a warning, and appears in the error column if the CLI command ends abnormally. If the line number appears in one of these columns, the CLI command whose Line column is the same as the displayed number will be executed.) If End is displayed in the succ, warn, or error column, execution has ended. If End is not displayed, the CLI command in the next line will be executed.
The following table describes the conditions under which execution of the CLI command ends normally, ends with a warning, or ends abnormally:
|
CLI command to be executed |
Ends normally |
Ends with a warning |
Ends abnormally |
|---|---|---|---|
|
YKLOAD |
Return code: 0 |
Return code: 1 to 16 |
|
|
YKQUERY |
Return code: 0 |
Return code: 1 to 8, or 24 |
|
|
YKRMTCDV |
Return code: 0 |
Return code: 1 to 12 |
|
|
Others |
Return code: 0 |
Return code: 1 to 4 |
|
The CLI command in the CLI macro runs on the same BCM Web API server as the CLI command that you run during monitoring, or from the copy group action menu or pair action menu. If monitoring or action menu is not running, you need to connect to the BCM Web API server and then run a CLI command in the macro file. For this reason, note the following:
-
Even if you close the CLI macro execution window, the BCM Web API server remains connected. To exit the BCM Web API server, click the end button for Web API Server on the dashboard tab.
-
Even if you perform a copy pair operation by using the CLI macro, tables on the summary tab are not automatically updated. If the copy group to be executed by the CLI macro is the same as the copy group to be monitored, the display will be updated after monitoring is complete.
-
If you specify the ROUTEID parameter in the default parameter dataset of the BCM Web API server, a route list is loaded when the copy group is loaded (YKLOAD) for the first time. Because the route list can only be loaded once in a session, attempting to load the route list executed by a macro during monitoring or when the action menu is running (because a copy group has been loaded) will result in an error.
-
While the CLI macro is running, you cannot perform any BCM GUI operations, including those in the main window.