Commands
The main function of most EnterpriseSCHEDULE jobs is the processing of the command list. The commands in the list are issued when the job is executed. The list may contain any batch file or executable accessible from the Windows environment. In addition any DOS commands which control the environment or flow of a batch file may be used.
The commands in a job are run through a pre-processor searching for control instructions and variable replacement expressions before the job is created. This allows the command expressions to read and/or modify aspects of the job before it is submitted. Once this is done, a temporary commands file is created and used by the job when it starts. For more on job preprocessing, see below.
Additional Buttons
Click the Edit... button to Open a larger Editor to edit scripting.
Click the Preview button to view the Processed script as it will appear when the job is submitted.
.png)
Click on the Preview button to display the command script with all preprocessor directives interpreted.
Job command preprocessing
The main function of EnterpriseSCHEDULE jobs is the processing of the command list. The commands in a job are run through a pre-processor searching for control instructions and variable replacement expressions before the job is created. This allows the command expressions to read and/or modify aspects of the job before it is submitted. Once this is done, a temporary command file is created and used by the job when it starts. The commands in the list are issued when the job is executed. Depending on the operating system the job resides on, the list may contain any batch or script file or executable. In addition any commands which control the environment or flow of a batch, script or com file may be used.
Click here to view some command examples and further explanation of the use of variables in job commands.
General syntax rules
The command list searches for appropriate tokens to substitute or evaluate. As each line is completed it is output to the command file or script.
Each instruction to be processed is defined as:
(( xxxxx ))
The "((" and "))" delimit the text that is to be replaced by the token "xxxxx". The token can be control instructions or values to look up. The "((" and "))" and all material in between are replaced by the evaluation.
General rules
The general rules of syntax are:
1.The "((" and "))" must appear on the same line of text.
2.White space inside is ignored. The template file is treated as a continuous character sequence include newline characters with the exception of control tokens which must be on one line.
3.Variable and control names are case insensitive.
4.Ending a control sequence with "*" suppresses the next newline. (i.e. ((IF_ZERO*)), ((DO abc*)) ...)
5.Ending a control sequence with "-" prevents the echoing out of the sequence if it is unknown. (i.e. ((ABC-)), ((DO ABC-)) ...)
6.Ending a control sequence with "+" causes any interior single quote mark " to be replaced by a pair of quote marks "". (i.e. ((ABC+)) )
7.Anywhere a variable can be placed a string constant "xxx" can be used.
8.Ending a control sequence with "%" Ex: ((xxxx%)) indicates replace all single "\" with a double "\\" .
For example:
1) A variable named F1 contains the name of a file to copy. The variable F2 contains the destination name and folder. The following command will copy the contents from F1 to F2.
copy ((F1)) ((F2))
The schedule system will replace ((F1)) and ((F2)) with their corresponding values before creating the temporary command file and starting up the job.
2) A program always requests two inputs from the running command file. In the example below the command requests today's date and the constant 23
rem run the report
RUN REPORT
((DATE TODAY "MM/NN/YY"))
23
3) Check to see if a variable has been set, if not terminate the job.
((IF_BLANK JOB_DATA_VARIABLE))
rem Job_data_variable not set, will now exit
exit
((ENDIF))