Run

Syntax

RUN literal [ device ] [ TRACE ] [ LA expression ] 
[ PA expression ]

Parameters

Passes parameter data to the report. The specified expression can be text or numeric and is limited to a maximum length of 254 characters. If a numeric value is used, it will be converted to text. In MCP systems this cannot be a national string.

Description

For Windows

The Run logic command initiates a report from ispec, report, or Messenger logic. It is interpreted as if a :RUN system command is issued to the runtime application.

After the report is initiated, it is not dependent on the completion of the ispec logic.

If the output device is specified as VD and input is from a terminal, the report is attached to that terminal. Otherwise the report is run as an unattached report.

For unattached reports, the report is run in background, and requests for input in response to Accept logic commands causes the report to terminate. To avoid using Message and Accept logic statements in reports, parameter information can be passed using variables, as described in Parameter Passing below.

Report Messages Sent to Client

Report Messages Sent to Client is a segment configuration property which determines whether reports executed via the Run logic command sends messages back to the initiating client session. It is used to allow users to choose whether messages sent from Reports that are run via ispec logic (using the Run logic command) are displayed on the status line (or Console window) or not.

Two types of messages are referred to here:

This behaviour varies for different platforms (MCP, Windows).

For example, with CLR there are two options:

For MCP

After the Report is initiated, it runs asynchronously and is not dependent on the completion of the logic of the Ispec.

The destination of the Report output is determined by the setting of the output device type and by the value of the attribute Glb.Stn.

If the output device type is VD, and input is from a terminal, the Report is attached to that terminal. If input is from External Automatic Entries (HUB), GLI, or OFFLINE, the Report will not be initiated. If the device type is RP, TP, or LP, and input is from a terminal, GLI, HUB, or OFFLINE, the Report is unattached.

The ROC system recognizes EX as a valid device type and write the output to a standard system data file. The name of this file will be derived from the Destination Station value held in Glb.Stn. You can specify a longer name if required.

When running an unattached Report, any messages are ignored, and requests for Accept command input from that Report causes it to go to end-of-job. Instead of using Message and Accept commands in Reports, you can pass parameters, as described in Parameter Passing below.

The chargecode that applies to your Report run is dependent on the values of the :COD System command and the Glb.Chargecode System attribute.

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.

Refer to the Agile Business Suite Runtime for ClearPath MCP  Administration Guide for more information.

For OLTP

When your application is processing an OLTP transaction, the following restrictions apply to the Run command:

Device types

The following table lists device types and their availability to each target host.

 

DeviceDescriptionWindowsMCP

AT

Video (attached report)

NO

NO

EX

Extract file (standard system data file)

YES

YES

LP

System or user-defined line printer

YES

YES

RP

Remote printer, via Prints/Reprints

NO

YES

TP

User-defined terminal printer (ROC alias)

YES

YES

VD

The attached user terminal (temporary file)

YES

YES

 

Attached reports

Attached reports return messages to the user interface from which the ispec executing the Run logic statement was initiated. Any messages appear on the status line of the terminal issuing the Run logic statement. The current screen display is overwritten, and replies can only be entered from the same terminal. Each terminal can only have one active attached report at a time.

To run an attached report, specify the output device type command parameter as VD.

Parameter passing

Parameter information can be passed to the report using one of the following methods:

The following restrictions apply to parameter passing:

Report status

When the Run logic command is executed, the Glb.Status built-in segment attribute is set to one of the values listed in the following table.

 

Glb.StatusDescription

ACTIV

The terminal already has an attached report.

BUSY

The maximum number of reports are already running; or the report has already been initiated by the same user.

INVAL

The report name is invalid or not locatable.

spaces

The report has been initiated.

NOFIL

Could not open Glb.Param file for the report

NOWRI

Could not write to Glb.Param file for the report

Note: There might be instances due to a system limitations where a report does not run, even if it might seem to have started satisfactorily with no error status being returned. For example, the maximum number of processes that the operating system can handle might have been exceeded.

Restrictions

Refer to Parameter Passing for more information on restrictions related to parameters.

Examples

Run "CashFlo" LP
Run "CashFlo" VD