RemoteRun (Method)

Return Value

(none)

Arguments

Parameter

Data Type

Meaning

commandLine

String

The Production Reporting command line. In general, the command line needs the report filename, database user id, and database password. It does not need the ‑keep flag or remote connectivity. Parameters can be passed to the Production Reporting program by placing them at the end of the command line.

See “Production Reporting Command-line Flags” in Volume 2 of the Production Reporting Developer’s Guide for more information about the Production Reporting command line.

Description

Runs the specified Production Reporting report on the remote server. This method copies the Production Reporting report file to the server, runs the Production Reporting report remotely on the server, waits for the report to complete running, retrieves the output SPF file from the server, and performs a cleanup operation.

The RemoteRun method generates a unique random name for the Production Reporting program when it is copied to the server. This eliminates contention with other users who may be running a program with the same name using the same directory on the server.

The standard output of a program executed on the server is spooled into a local file. The name of the spool file on the PC is based on the name of the Production Reporting program on the PC, with the file extension changed to OUT.

Production Reporting errors are trapped and documented when they occur. If errors occur, an error file is created and downloaded to the PC. The name of the error file on the PC is based on the name of the Production Reporting program on the PC, with the file extension changed to ERR.

The output SPF file has the same pathname as the specified Production Reporting report file, but with an SPF extension.

When the Production Reporting Viewer is displaying report output, close the report prior to running an Production Reporting program to prevent file sharing violations due to overwriting an open SPF file.

Note:

It is assumed that there is no -F flag or NewReport command used in the Production Reporting program, and that the program generates a single report. It is also assumed that there is no -E flag on the command line, and that the Production Reporting command on the server has the extension SQR. If these assumptions are not true, do not use the RemoteRun method; instead use the RemoteGet, RemotePut, and RemoteExec methods directly.

The following command line runs the program mytest.sqr using the database login acctg and the password acctg:

mytest.sqr acctg/acctg