You can configure the VersaLex application to generate an email based on the results of an action or a host action:
- on any type of failure and/or
- on each successful send of a file and/or
- on each successful receive of a file and/or
- on each successful copy of a file using LCOPY or
- on overall conditions being met for a CHECK command ( and applications only) or
- on overall conditions not being met for a CHECK command (VLTrader and Harmony only).
Similarly, you can also configure the VersaLex application to execute a program, script, or operating system command based on the results of an action or a host action. The syntax and rules for execute-on commands are the same as those for the SYSTEM commands (see Using operating system commands in actions), with the following differences:
- The word SYSTEM is not used within the execute-on string.
- When using macro variables, the Execute-On context is used rather than the SYSTEM command context.
Below are some Execute-on command examples:
|Operating System||VersaLex Execute-On command|
|Windows||command.com /c copy x y|
|Windows||cmd.exe /c copy x y|
|Windows||[SuccessCodes=0-1,255] cmd.exe /c copy x y|
|Unix||cp x y|
$LCOPY x y
A list of multiple commands which may be either all operating system commands or the supported action commands may also be specified. The commands must be separated by either '&' or '&&’ characters. When '&' is used all commands will execute sequentially regardless of the status of the previous command. For example, two LCOPY commands in the Execute-On field could be specified as:
$LCOPY x y & LCOPY a b
where the second LCOPY executes regardless of the status of the first LCOPY. When '&&' commands is used a command will execute if the previous command does not result in an error. For example in:
$LCOPY x y && LCOPY a b
the second LCOPY will execute only if the first LCOPY does not result in an error. For operating system commands, the ‘&’ and ‘&&’ operator functionality is dependent on the operating system or shell being used.
To set the email and execute properties for all hosts at the system level, refer to Advanced system options.
To set the email and execute properties for a specific host, see Setting advanced host properties.
Please sign in to leave a comment.