Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

bs2system - execute BS2000 command (extension)

&pagelevel(4)&pagelevel

Syntax

#include <stdlib.h>

int bs2system(const char *command); 

Description

bs2system() executes the BS2000 command given in the string command.

Return val.

0

if the BS2000 command was executed successfully (return value of the corresponding BS2000 command: 0).


-1

if the BS2000 command was not executed successfully (return value of the BS2000 command: error code != 0).


undefined

if control is not returned to the program after execution of the BS2000 command (see Notes).

Notes      bs2system() passes the command string as input to the BS2000 command processor

MCLP without any changes (see also the manual "Executive Macros" [10 (Related publications)]). No conversion to uppercase letters occurs, so the BS2000 command to be executed must be specified in uppercase. It may consist of up to 2048 characters and must not be specified with the system slash (/).

In the case of some BS2000 commands (e.g. START-PROG, LOAD-PROG, CALL-PROCEDURE, DO, HELP-SDF), control is not returned to the calling program after they are called. Programs that permit premature terminations should therefore flush all buffers (fflush()) and/or close files before the bs2system call.

See also   system(), stdlib.h.