This section explains the job net manipulation API/EE (Mp_JobschControlEx)
Synopsis
[Windows]
#include "f3csbJobschControlEx.h" int Mp_JobschControlEx (char *project, char *netname, int action, int rerunopt, int system_num) ;
[UNIX]
#include "jobschapiex.h" int Mp_JobschControlEx (char *project, char *netname, int action, int rerunopt, int system_num) ;
Description
This API is an interface to use the jobschcontrol command from the C interface in Systemwalker Operation Manager EE.
Parameters
project
Specify the name of the project where the job net to be manipulated exists. Note that you can only specify the names of the projects that the API execution user can use. This can be omitted if there is only one project having the job net that the API execution user can use. In this case, NULL must be specified.
netname
Specify the name of the job net to be manipulated. This cannot be omitted.
action
Specify the job net manipulation method from the following:
Start
Cancel
Restart
Pause
Continue
Disable
Enable
Confirm
Reinstate
Revoke
rerunopt
Specify the option when 3 (Restart) is selected for action. If 3 (Restart) is not selected for action, 0 should be specified.
Performs normal re-activation. Activates from an abended job. If the restart point is set at a job located before the abended job, restart is executed from that job.
Restarts the job net from the top job.
Re-activates a job net set in "Invalid at next restart" mode in relation to an abended job.
(Skips the abended job and activates the next job).
Jobs forcibly terminated are handled in the same way as abended jobs are handled.
system_num
Specify operating target subsystem number using a range from 0 to 9.
Return Values
Return Value | Meaning | Action |
---|---|---|
0 | Normal termination. | - |
4 | Mode in which job net cannot function. | Perform the operation again after the status of the job net has changed. |
8 | Jobscheduler service/daemon is not running. | Start the Jobsheduler service or daemon and perform the operation again. |
12 | Error in parameter setting or invalid user privilege. | Take one of the following measures:
|
16 | Fatal error occurred. | A system error may have occurred. Check the event log or syslog for any system abnormalities. If an error occurs, collect Jobscheduler information using the Maintenance Information Collection Tool, and then contact a Fujitsu SE. If none are found, the problem may only have been temporary, so perform the operation again. |
Required Files
The following files are required for use of the job net manipulation API shown above:
[Windows x86]
f3csbJobschControlEx.lib
f3csbJobschControlEx.h
[Windows x64]
f3csbJobschControlEx_x64.lib
f3csbJobschControlEx_x64.h
[Common to Solaris 32-bit and Linux x86]
libjobschex.so
jobschapiex.h
[Solaris 64-bit]
libjobschex_64.so
jobschapiex_64.h
[Linux x64]
libjobschex_x64.so
jobschapiex_x64.h
The job net manipulation API is stored in the LIB file, and the definitions and structures used by the job net manipulation API are declared in the INCLUDE file. These files are stored under the following directories.
[Windows]
Systemwalker Operation Manager installation directory: MpWalker.JM\lib
Systemwalker Operation Manager installation directory: MpWalker.JM\include
[Common to Solaris and Linux]
/opt/FJSVJOBSC/usr/lib
/opt/FJSVJOBSC/usr/include
Program Example
Below is an example program of the job net manipulation API/EE:
[Windows]
#include <windows.h> #include <stdio.h> #include <stdlib.h>#include "f3csbJobschControlEx.h" void main() { int ret; ret = Mp_JobschControlEx("user1", // project name "net001", // jobnet name 1, // action : start 0, // rerun opt : none 1); // sub system number if (ret == 0) { printf("jobnet(net001) is controlled normally.\n"); } else{ printf("ERROR: return code = %d\n", ret); exit(1); } exit(0); }
[UNIX]
#include <stdio.h> #include <stdlib.h> #include "jobschapiex.h" main () { int ret; ret = Mp_JobschControlEx ("user1", /* project name*/ "net1", /* jobnet name*/ 1, /* action : start */ 0, /* rerun opt : none*/ 1); /* sub system number*/ if (ret == 0) { printf ("jobnet(net1) was normally controlled.\n"); } else{ printf ("ERROR: return code = %d\n", ret); exit(1); } exit(0); }