Definition | #include <stdlib.h> void bs2exit(int status, const char *monjv_rcode);
The status indicator of the monitoring job variable (1st to 3rd byte) is set to the value "$T " or "$A " in accordance with the first status parameter. The return code of the MONJV (4th - 7th byte) can additionally be supplied with the monjv_rcode parameter. | |
Parameters | int status see const char *monjv_rcode This parameter can be used to specify a pointer to 4 bytes of data (the return code), which is loaded in the MONJV when the program terminates. | |
Notes | When a program is terminated with In order to set and query monitor job variables, you must start the C program with the following command:
The content of the job variable can then be queried, e.g. with the following command:
Further information on job monitoring using MONJV can be found in the "Job Variables" manual. | |
Example | The program is terminated and the return code is set #include <stdio.h> int main(void) { ... if(fehler) bs2exit(-1, "ABCD"); } | |
see also | exit, _exit |