C$RUN

ACUCOBOL-GT for Windows supports an alternate method for running other programs. This is through the library routine C$RUN. This library routine works identically to the SYSTEM library routine, except that the calling program does not wait for the called program to finish. Instead, both programs run in parallel.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

Usage

CALL "C$RUN"
    USING COMMAND-LINE,
    GIVING STATUS-VAL

Parameters

COMMAND-LINE PIC X(n) Contains the operating system command line to execute.
STATUS-VAL Any numeric data item Returns 0 if successful or -1 if not.

Description

C$RUN sets STATUS-VAL to -1 if the call fails or to 0 if it succeeds.

C$RUN is implemented only under the Windows and Windows NT versions of ACUCOBOL-GT. On other systems, it always returns 1.

C$RUN is supported in Thin Client environments. To execute a program on the display host in a thin client environment, add the prefix @[DISPLAY]: to the name of any program that resides on the client machine. For example:

C$RUN "@[DISPLAY]:C:\notepad myfile.txt

Compatibility Issues

"@[DISPLAY]" is not supported in this COBOL system.