Professional Documents
Culture Documents
The batch file is a text file that contains a group of MML commands. You can run MML
commands by directly executing the text file instead of entering commands manually.
Note
You can add commentaries for batch commands. The commentary can be in //... or /*...*/
format. The format //... is for the commentary with only one line, and /*...*/ for the
commentary with one or more lines.
Related Topics
Operation
To run the immediate batch command, perform the following steps:
1.
Choose System > Batch Commands or press Ctrl+E. The MML
Batch interface appears.
2.
Select Immediate Batch Command.
3.
Click New and enter the batch command in the entry box.
4.
You can also click Open to select and open the batch file. The file name of the
immediate batch file appears on the title bar of the interface.
5.
Click Analyze Syntax to perform primary and senior syntax analysis of the batch file
added or opened. For details, see Syntax Analysis of Immediate Batch Command.
Note:
In offline mode, you can create or open a batch file and perform syntax
analysis, but you cannot click Go or perform related operations as described below.
6.
Click Set and set the related parameters. For details, see Set Immediate Batch
Command.
7.
The line No. is displayed on the left of a line. The line No. of the line in which the
cursor is placed is in red. Click the left of a line and set a breakpoint for the help. Click it
again, the breakpoint is cancelled.
8.
Click Go and the system runs the batch command. After the execution, the following
results appear on the status bar of the MML Batch interface:
Total Results: Indicates the general results of the execution, including the
number of successful and failed commands.
Current Result: Indicates the execution result of the latest command that is
executed.
Time Used: Indicates the time used for the execution. The format is
HH:MM:SS. Here, HH, MM, and SS represent hour, minute, and second respectively.
The time used for the execution is from the time when the execution starts to the time
when the execution is complete or being paused manually. When a batch task is
paused or the execution reaches a breakpoint, the timing stops. When you create or
open a batch file, the time used is cleared.
If you click Yes to All, the LM continues the batch command processing but
does not display such a prompt even another command error is found.
If you click No, the LM stops the batch command processing. In this case, if
you click Go, the LM runs the commands from the first line.
Note
Parameter
Parameter
Description
All
Step by
Step
Execution
Indicates that the batch command processing is paused at
Type
Breakpoint the breakpoint if the breakpoint is set. In this case, you must
click Go to continue the processing.
Range
If no text exists in the command edition area, the system displays "No command in
this file."
If there are texts but no command lines in the command edition area (there are only
comments, spaces, or line feed characters), or if there are command lines but no
syntactical error is found, the system displays "Analyzing the syntax is complete. No
syntactical error exists." after the syntax analysis is complete and the process bar
disappears.
If there are command lines, and syntactical errors are found, the system adds a
syntactical error label on the left label bar and an error statistical label (shown as
) on
the right label bar after the syntax analysis is complete and the process bar disappears.
The Result Information dialog box appears. You can click Save As in the dialog box to
save the error information.
Note:
When you move the cursor to the error statistical label, the statistical information on the
syntactical error found during the analysis is displayed.
The following describes certain notes on the syntax analysis of all the text lines:
Syntactical errors can be classified into primary syntactical errors with the label
and senior syntactical errors with the label . When you move the cursor to a
syntactical error label, the corresponding syntactical error information is displayed. For
details, see Syntactical Error Description.
After you click Analyze Syntax, the system automatically clears the existing
syntactical error labels on the left and right label bars of the command edition area. If no
syntactical error is found, neither a syntactical error label nor an error statistical label is
displayed on the left and right label bars. If a syntactical error is found, a syntactical
error label and an error statistical label are displayed on the left and right label bars.
The Result Information dialog box is the table consisting of three columns,
namely, Line No, Type, and Reason. The table lists the number, error type (error or
warning), and cause of the command line. You can click on a column header to
sequence the information in each column. Line No is sequenced according to the
numeral. The other two columns are sequenced according to the size of the character
string.
After you correct the errors found, you can analyze the syntax of the modified
command line according to the methods described in "Syntax Analysis for a Single Text
Line".
If no syntactical error is found, no label is displayed on the left and right label bars.
Note
When analyzing the syntax for a command line, the system stops the syntax analysis
on this line if a syntactical error is found. This syntactical error is deemed as the result of
the syntax analysis on this line.
When analyzing the syntax for the whole text, the system automatically stops the
syntax check if 1000 syntactical errors are found, and the prompt "There are 1000 lines
of syntactical errors. The syntax check will stop." appears. The system can perform the
syntax analysis on a text line, however.
The result of the syntax analysis can be saved as txt files only.
When a command line with a syntactical error label is deleted, the syntactical error
label is deleted.
Syntactical errors can be classified into primary syntactical errors and senior syntactical
errors based on error types.
A parameter is redundant.
The format of a parameter is incorrect. That is, the parameter value is not
expressed in the formal A=B. For example, no value is placed before or after "=", or
"=" is missing.
Note
All the command character strings contained in the syntactical error information are
capitalized.
When analyzing the syntax for a command line, the system stops the syntax analysis
on this line if a syntactical error is found. This syntactical error is deemed as the result of
the syntax analysis on this line. That is, only one syntactical error is labeled for a
command line.
To meet the requirements of browsing execution results of the immediate batch commands,
the LM provides a function to save the results of immediate batch commands. You can
save the execution results to a specified file.
Operation
To set the immediate batch commands, perform the following steps:
1.
Click Set on the Immediate Batch Command interface. The Set dialog box appears.
2.
Set the time interval. Thus, after running a batch command, the system waits for the
set time interval before running the next command. By default, it is set to 0.
3.
You can choose whether to save failed commands and set the path. By default, the
system saves the failed commands and provides a path.
Note:
The default path for saving the failed commands is: <installation
directory>\client\output\<product name>\<version information>\batch. The
default file name is failResult_YYYY-MM-DD-HH-MM-SS.txt. Here, YYYY-MMDD-HH-MM-SS stands for year, month, date, hour, minute, and second
respectively, which is the time when you open or create a batch file, so it is
different when you open or create a batch file each time.
4.
Save the results. You can choose to save successful results, failed results, both
successful and failed results, or neither successful nor failed results. By default, the
system saves the failed results and provides a path. You can also specify another file to
store the results.
Note:
The default path for saving the results is: <installation
directory>\client\output\<product name>\<version information>\batch. The
default file name is BatchMML_Result_YYYY-MM-DD-HH-MM-SS.txt. Here,
YYYY-MM-DD-HH-MM-SS stands for year, month, date, hour, minute, and
second respectively, which is the time when you open or create a batch file, so it
is different when you open or create a batch file each time.
Note
When the size of the saved file exceeds 5 MB, the system creates a new file automatically.
The principle of the new file is as follows: The name of the first created file is the original
file name added with "_1". The names of the subsequent files increase by 1 automatically.
For example, if the name of the currently saved file is BatchMML_Result_2006-04-17-1013-38.txt, the name of the first created file is BatchMML_Result_2006-04-17-10-1338_1.txt, and the name of the subsequently created file is BatchMML_Result_2006-0417-10-13-38_2.txt, and so on.
Find
Operation
1.
Right-click in the window and select Find, or press Ctrl+F. The Find dialog box
displays.
2.
3.
4.
5.
Note
When the last record is found, the system displays "Searching is completed" if you
click Find Next. If it is not found, the system displays that the keyword is not found.
When using the wildcards for searching, the system searches the texts that map the
object text in one line. When Use Wildcards is chosen, Match Case and Match Whole
Words Only are unavailable. The wildcard search supports using the wildcards ? and *.
The ? represents any single character, and * represents any series characters.
Replace
Operation
1.
Right-click in the window and select Replace, or press Ctrl+H. The Replace dialog
box displays.
2.
3.
4.
5.
6.
Operation
To run the time-based batch commands, perform the following steps:
1.
Choose System > Batch Commands or press Ctrl+E. The MML
Batch interface appears.
2.
Select Timing Batch Command. Click the buttons on the right side to perform the
following operations:
Add: For details, see Add Batch Task. The button is available after the
interface is opened. You can add batch tasks to the task list through the Add button.
Delete: Select a batch task in the task list, and click Delete or
press Delete on the keyboard. The selected batch task is deleted. The time-based
batch commands in the status of waiting, interrupted, and finished can be deleted.
Those in the status of running cannot be deleted.
Pause: Select a batch command being executed and click Pause, the
execution of the batch command pauses. The status of the batch task being paused
is Pause.
Continue: Select a batch command being paused and click Continue, the
execution of the batch command continues.
Stop: Select a batch command being executed and click Stop, the execution
of the batch command stops.
Note
1.
For a batch task being paused, if you click Stop, the execution of the batch
command is stopped forcibly, and the Continue button is changed to the Pause button,
which is unavailable.
2.
When a task being paused exists in a task list, other tasks cannot be executed even
if it reaches the execution time.
3.
The system processes only one time-based batch task at a time but supports
processing several batch tasks continuously.
It is time for task B and C to be processed but the execution of task A is not
completed. After the execution of task A is completed, the one with the earlier
execution time is processed first. If the execution time of task B and C is the same,
the one with the earlier creation time is processed first. When the system starts to
process the task and two tasks are required to be processed, the one with earlier
execution time or earlier creation time is processed first.
It is time for several tasks to be processed but the execution of task A is not
completed. The one with earlier execution time is processed first. If the execution time
of all the waiting tasks is the same, the one with the earlier creation time is processed
first.
Operation
To add a batch task, perform the following steps:
1.
Choose System > Batch Commands or press Ctrl+E. The MML
Batch interface appears.
2.
Select Timer Batch Command.
3.
Click Add. The Add Batch Task dialog box appears.
4.
Select a batch file and click Analyze Syntax to perform primary and senior syntax
analysis of the added batch file. For details, see Syntax Analysis of Time-Based
Batch Command.
Note:
If you do not click Analyze Syntax, the system automatically performs primary
syntax analysis of the batch file after you click OK in step 8.
5.
Note:
Sending Commands interval(s) means the time interval of two adjacent
commands being processed. By default, it is set to 0.
6.
You can choose whether to save failed commands. By default, the system saves the
failed commands and provides a path. You can also specify a path and file name.
7.
Save the results. You can choose to save successful results, failed results, both
successful and failed results, or neither successful nor failed results. By default, the
system saves the failed results and provides a path.
8.
Click OK and the task is added in the task list.
Note
Operation
Click Analyze Syntax to perform primary and senior syntax analysis of the added batch
file.
The following cases may occur:
If the batch file does not exist or cannot be opened, the system displays "The batch
file XXX does not exist or cannot be opened. Please select another batch file". XXX
indicates a text file with an integrated path, such as D:\Text Document\New Text
Document.txt.
If the batch file is empty, that is, if the size of the batch file is 0, the system displays
"No command in this file."
If the batch file does not contain a command line (there are only comments, spaces,
or line feed characters), or no syntactical error is found, the system displays "Analyzing
the syntax is complete. No syntactical error exists." after the syntax analysis is complete
and the process bar disappears.
If the batch file contains command lines and syntactical errors are found, the Result
Information dialog box appears after the syntax analysis is complete and the process
bar disappears. You can click Save As in the Result Information dialog box to save the
error information.
Note:
The Result Information dialog box is a table consisting of three columns, namely, Line
No, Type, and Reason. The table lists the number, error type (error or warning), and cause
of the command line. You can click on a column header to sequence the information in
each column. Line No is sequenced according to the numeral. The other two columns are
sequenced according to the size of the character string.
Note
When Batch File is not specified, the Analyze Syntax button is unavailable.
When analyzing the syntax for a command line, the system stops the syntax analysis
on this line if a syntactical error is found. This syntactical error is deemed as the result of
the syntax analysis on this line.
When analyzing the syntax for the whole text, the system automatically stops the
syntax check if 1000 syntactical errors are found, and the prompt "There are 1000 lines
of syntactical errors. The syntax check will stop." appears.
The results of the syntax analysis can be saved as txt files only.
Operation
To modify a batch task, perform the following steps:
1.
Select an added batch task on the Timer Batch Command tab.
2.
Click Modify, or press Enter on the keyboard, or double-click the batch task.
The Modify Batch Task dialog box appears.
Note:
If you double-click a batch task in running state, the Modify Batch Task dialog
box does not appear.
3.
Reselect a batch file and click Analyze Syntax to perform primary and senior syntax
analysis of the batch file to be added. For details, see Syntax Analysis of Time-Based
Batch Command.
Note:
If you do not click Analyze Syntax, the system automatically performs primary
syntax analysis of the batch file after you click OK in step 5.
4.
5.
Note
Do not modify a batch task in running state. After the modification, a batch task is in waiting
state.