Just before terminating, MFBSIJCL can invoke a termination user exit.
Use the parameter TerminateExit to specify the name of the termination user exit module to be called. Use the Mfbsiue2.cpy interface as shown.
* -- copybook "MFBSIUE2" -- 01 ES-UserExit-MFBSIJCL-Terminate. **> MFBSIJCL exit's common area 05 ES-UE-CommonArea pic x(1024). **> Input parameters *> OS Environment 05 ESue2-OS pic x(1). 88 ESue2-Windows value '0'. 88 ESue2-UNIX value '1'. *> SJoBID 05 ESue2-Job-ID pic x(16). *> ES server name 05 ESue2-ESserver pic x(8). *> Full name of JCL file that was submitted 05 ESue2-JCLfile pic x(256). *> MFBSI_DIR directory 05 ESue2-MFBSI-DIR pic x(256). *> Execution mode: submit JCL or JOB restart 05 ESue2-ExecutionMode pic x(01). 88 ESue2-ExecNormal value 'N'. 88 ESue2-ExecRESTART value 'R'. 05 filler pic x(14). * **> Input/Output parameters 05 ESue2-ReturnCode pic 9(9) comp-5 . * **> Delimiter 05 ESue2-X00 pic x(1).
This interface copybook file can be found in $COBDIR/cpylib.
A sample COBOL program mfbsiue2.cbl can be found in $COBDIR$COBDIR\cpylib.
This user exit module can be used for various duties, such as cleaning up files produced by the JCL exit functionality. If necessary, you can reset the return code returned by MFBSIJCL.