For MFBSI usage, the scheduler launches a COBOL program named MFBSIJCL, which executes the CASSUB/CASOUT commands. MFBSIJCL then communicates with Enterprise Server/JCL using the Event Manager user exit MFBSIEMX.
MFBSIJCL waits for Enterprise Server/JCL job execution to end. It then returns the JCL Job return code or a specific return code to the scheduler.
When running outside of a Performance and Availability Cluster (PAC), communication between MFBSIJCL and MFBSIEMX is performed through a semaphore file named JOBnnnnn.Sem, where nnnnn is the job number assigned by Enterprise Server/MSS JCL. These files are located in a folder shared by all MFBSIJCL instances and by MFBSIEMX. The environment variable MFBSI_DIR specifies this folder. If multiple Enterprise Server/MSS JCL servers are used, each one requires its own MFBSI_DIR settings unless Enterprise Server clustering is used.
When running inside a PAC, MFBSIEMX stores the semaphore data in a Redis Scale-Out Repository (SOR). This requires additional configuration. See The MFBSI Configuration File for more information.
MFBSIEMX creates a zero byte file when Enterprise Server/JCL starts the job execution and adds a record containing the JCL return information when the job ends.
MFBSIJCL waits for the job start which creates JOBnnnnn.Sem, then for the job end in Enterprise Server/MSS, which updates JOBnnnnn.Sem. When ended, MFBSIJCL stops execution with the return code read from JOBnnnnn.Sem. See MFBSIJCL Return Codes for more information on return codes.
Using this technique, MFBSIJCL and Enterprise Server can run on different machines and even on different operating systems. Only a file share between machines is required. For example, the scheduler agent can run under Windows, launch MFBSIJCL with the appropriate parameters to submit the job to a machine running UNIX. The MFBSIJCL process run under Windows can monitor any directory residing on the UNIX machine using a network share utility such as Samba.
MFBSIJCL includes a timeout mechanism to prevent an instance from running infinitely without feedback. An alert can be sent to the scheduler if a either a startup or run timeout is detected. The alert calls an appropriate action in ESMAC:
MFBSIJCL can use a user exit MFBSIALR to send an alert to the scheduler. You must customize and compile/link MFBSIALR for a specific scheduler interaction. A skeleton program for MFBSIALR is available in $COBDIR/cpylib (UNIX/Linux).