The tool “Execute OS Command” can schedule commands on the local operating system. Those commands must be specified by using input parameters. Several input parameters will be concatenated to a single command string using the input parameter separator attribute as the delimiter.
If a program or a batch file was called by the OS Command, AWM can parse its return values, as long as they obey certain syntax rules (see the following table).
The return code indicates whether the called program or batch file executes successfully or ends with warnings or errors. If the return code is higher than 0, a message should also return. If the return code is higher than the maximum allowed return code (see Application Options),an error dialog box appears displaying the tool messages, and the action in which the tool executes is aborted.
Messages returned by the OS command will always show up in a dialog box in the client after the action was executed. As long as the return code is lower than the maximum allowed return code, returned messages from all tools will be collected and shown after the action is finished.
Output parameters must be returned at the very end. Note that Microsoft Windows batch files automatically "echo" every statement, which can cause problems when returning output parameters. Therefore Micro Focus strongly recommends to disable statement echoing by using the "@echo off" statement in the batch file.
This example shows a Windows batch file that returns a message, return code and an output parameter:
@echo off … echo ReturnCode: 4 echo Message: No customers found for the given filter %1. echo OutParm: %~dp0customers.txt