MFBSI Architecture

For MFBSI usage, the scheduler launches a COBOL program named MFBSIJCL, which executes 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.

Communication between MFBSIJCL and MFBSIEMX is done 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 server are used, each one requires its own MFBSI_DIR settings unless Enterprise Server clustering is used.

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 the topic on how MFBSIJCL handles return codes for more information.

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 SEE Web Administrator.

MFBSIJCL may 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 %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\cpylib (Windows), or $COBDIR/cpylib (UNIX/Linux).