3.2.5.3 Running the utility

To start the interactive utility, run the following commands from the extracted directory:

cd bin

./pbsm-automate

The utility displays the available operations. Operation names are not case-sensitive.

To run an operation without using the interactive menu, use this syntax:

./pbsm-automate <operation> <parameters>

For example:

./pbsm-automate push File1

Run one operation for one input at a time. Do not use comma-separated multiple inputs in a single invocation. When an operation requires a file path, specify the path using double forward slashes, for example `//path//to//file`.

All API calls made by the utility are synchronous — the utility never exits before the call has returned a response. When called with parameters, it writes the response to the console and to the output file, and updates the log file, before exiting. If the parameters passed are invalid or insufficient, the utility writes the error to the console and the log file, and deletes (or empties) the output file so it never holds stale content.

Scripting example — because output and log file locations are configurable per environment, pbsm-automate calls can be chained in a shell script, reading the output file between calls to drive conditional logic:

./pbsm-automate EXECUTE <batch-id> <date>
## read $pbsm_automate_output to extract the batch-run-id

./pbsm-automate STATUS <batch-run-id> [<optional-task-id>]
## read $pbsm_automate_output to get the batch status and proceed