Start

Syntax

START expression [ expression ]

Parameters

Start can be abbreviated as ST.

Description

Depending on the target host type, this command enables an Ispec or Report to start:

It also enables to start a script from a Messenger transaction.

The program or file is started immediately in the background. Specific details for each target host type are given in the following subsections.

When processing an OLTP transaction, the Start logic command initiates the associated program or job, but the program or job does not participate in the current OLTP transaction.

Note: If the class executing the Start logic command is restarted by recovery, the Start logic command is executed again, even if the program or job is still active or has successfully terminated.

For an MCP-based system

The Start command enables an Ispec or Report to execute a WFL Job with parameters.

If the parameter item is an attribute or screen item, it must include quotation marks, or the WFL will fail. The WFL Job File should be located on the Object pack family, or on the alternative (OTHERWISE) pack for the system usercode. It is your responsibility to provide a valid parameter as required by the Job.

Files started in this way are not attached to (or controlled by) the System.

The Start command has the following parameters:

If the length of the first parameter and the length of the second parameter both exceed 18, variables must be used (not literals).

If the file equates, Accept command, or string parameter is invalid, MCP rejects the Start command, the program or job will not be started, and the logic will not receive notification of the error.

Glb.Status is set to indicate the result of the Start command, as shown in the following table.

Value

Result indicated

INVAL

The program or job name is invalid or cannot be located

Space

The MCP has been instructed to start the program or job

To avoid duplication, Runtime only restarts jobs in Ispec or Report recovery, where those Start commands were apparently not successfully executed for those jobs prior to the failure. Start commands that were successfully executed prior to the failure will be ignored.

If the failure is due to a system halt/load, the MCP automatically restarts all jobs that were active at the time of the interruption.

Note: Timeout for LSS to respond to a START and RUN request is now configurable through the use of the MAXWAIT Task attribute associated with the LINCSUPPORT library. When the wait time has exceeded the value set or up to the current default of 60 seconds, GLB.STATUS is set to: “TOUT” meaning timeout.

The chargecode that applies to your WFL start is dependent on the values of the :COD System command and Glb.Chargecode. Refer to Setting Chargecodes for Systems and Reports or Report and WFL Job Chargecodes in the Agile Business Suite Runtime for ClearPath MCP Administration Guide for more information.

Failure behavior

The Glb.Status built-in segment attribute is set to INVAL if the program or file is invalid or cannot be found. Otherwise, it is set to spaces if the program or file is found and initiated.

Examples

Example 1

This example launches a report with variable as a parameter.

Data1 := "This is the parameter"
Start "MYJOB" Data1

Example 2

This example executes the DOS command Dir.exe with the arguments /o-d and /p.

Start "dir" "/o-d /p"

Example 3

This example is for the MCP environment.

Start "BACKUP/WFL" "\"TAPE001\""