Executes an executable program in the background and returns the process id to GAUSS.
program (string) – the name of the program, including the extension, to be executed.
comline (string) – the arguments to be placed on the command line of the program being executed.
pid (scalar) –
the process id of the executable returned by program.
execbg()cannot execute program, the error returns will be negative:
file not found
the file is not an executable file
not enough memory
command line too long
pid = execbg("atog.exe", "comd1.cmd"); if (pid < 0); errorlog "atog failed"; end; endif;
In this example, the ATOG ASCII conversion utility is
executed under the
execbg(). The name of the
command file to be used,
comd1.cmd, is passed to ATOG
on its command line. The returned value, pid, is tested
to see whether ATOG was successful. If not successful the
program terminates after printing an error message. See ATOG .