Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
bs2exit - program termination with MONJV (BS2000)
&pagelevel(4)&pagelevel
Syntax | #include <stdlib.h> void bs2exit(int status, const char *monjv_rcode); |
Description | bs2exit() terminates the calling program. Before this is done, all files opened by the process are closed, and the following messages are output on stderr:
"CCM0998 used CPU-time t seconds", if CPU-TIME=YES is set in the RUNTIME option. "CCM0999 exit FAILURE", if status = EXIT_FAILURE (value 9990888), "CCM0999 exit status", if status != EXIT_SUCCESS (value 0) and != EXIT_FAILURE (value 9990888). "EXC0732 ABNORMAL PROGRAMM TERMINATION. ERROR CODE NRT0101“
The status indicator of the monitoring job variable (1st to 3rd byte) is set to the value "$A" in accordance with the status argument just like for the exit() function if status =
EXIT_FAILURE. The monitoring job variable is set to “$T” for all other values of status. The return code of the MONJV (4th - 7th byte) can be additionally supplied with monjv_rcode. The monjv_rcode parameter may be specified as a pointer to 4 bytes of data (the return code) that is loaded in the MONJV when the program terminates. The contents and evaluation of the status argument are the same as for exit() . |
Notes | When a program is terminated with bs2exit(), the termination routines registered with
atexit() are not called (see exit()). In order to set and query monitoring job variables, the C program must be started with the following command /START-PROG program,MONJV=monjvname
The contents of the job variable can then be queried, e.g. with the following command: /SHOW-JV JV-NAME(monjvname)
Further information on job monitoring using MONJV can be found in the "Job Variables" manual. |
See also | exit(), _exit().
|