Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Running Console Applications

  • Last UpdatedNov 06, 2025
  • 1 minute read

The Job Launcher can also start console applications (for example, sa004.exe). There are a number of ways how to run console applications:

  1. Read input from user and display output in the console window. This is the normal way.

  2. Read input (stdin) from a supplied file. This alternative can be useful when running a console application in batch without any user interaction. In this case, it's probably desired to also redirect the console output (stdout) to a file.

To cover both of these cases, two new command line arguments are included in tbstartjob.exe:

  • -stdin_file <fname>

    This argument tells the application to read standard input (stdin) from the specified file (<fname>).

  • -console_stdout

    This argument tells the application to write standard output (stdout) on the console. This should only be used for console applications (for example, sa004.exe). If this argument is omitted, the default behavior is to redirect stdout to a file (which is showed in the Log Viewer).

To make applications visible to the job launcher, the applications have to be defined in MarJobs.xml. Below is an example of a MarJobs.xml file that defines sa004.exe.

<?xml version="1.0" standalone="yes"?>

<applications>

<system name="User">

<application>

<name>sa004</name>

<short_name>sa004</short_name>

<executable>sa004.exe</executable>

</application>

</system>

</applications>

Example:

Run sa004.exe, show output on the console and let user do the interaction:

marjobstarter.exe -console_stdout -application sa004

Run sa004.exe, show output on the console and supply an input file:

marjobstarter.exe -console_stdout -stdin_file c:\input.txt -application sa004

Run sa004.exe, redirect stdout to a file and supply an input file:

marjobstarter.exe -stdin_file c:\input.txt -application sa004

TitleResults for “How to create a CRG?”Also Available in