Previous Topic Next topic Print topic


User Exit Invocation, Rules, and Guidelines

The user exit, which must be named MFJUXIT (unless overridden with the MFJUXIT environment variable), is optional and is invoked with the user exit interface block (mfjdxit.cpy) as the only parameter. It contains:
  • A header part that contains among other items, the event code of the event and the action code that represents the action that can be requested.
  • A data part that contains the data describing the event.
mfjdxit.cpy describes in detail all the event codes, actions codes, and data associated with each event. When looking at mfjdxit.cpy, note the following:
  • Field names containing -I- (for example JXIT-I-size) are input to the user exit and must not be modified.
  • Field names containing -U- (for example JXIT-U-PGM-alias) are used for input and output. On entry to the user exit, they are set as appropriate and may be changed by the user exit to an acceptable value upon return.
  • All character data is in ASCII (ANSI). Null values are those appropriate for the data type; that is blanks for character data, and zeros for numeric and binary data.

The user exit is called as events occur.

Most events occur in the batch initiator SEP. The exceptions are:
  • For jobs submitted via the ESMAC console, the Event-job-ready, Event-job-queued, and Event-job-stmt-info events occur in an Admin SEP.
  • For all other job submission methods, the Event-job-ready, Event-job-queued, and Event-job-stmt-info events occur in a Normal (standard) SEP.
  • For SSTM jobs, the job-started through job-ended events occur once in each Normal SEP, but might be reported in the console log as occurring in a batch initiator SEP.
  • Depending on the submission method, the Event-job-concluded event could occur in an Admin SEP or a Normal SEP; however, it occurs only if the job is not intended for execution (specifies TYPRUN=COPY or TYPRUN=SCAN) or if it fails submission due to JCL errors.

A JCL user exit can remember only the events in the process from which it was invoked.

If the user exit fails for any reason, it is disabled in the failing process for all subsequent events.

Note:
  • The user exit must be named MFJUXIT, unless the name is overridden with the MFJUXIT environment variable - e.g MFJUXIT=<optional location specification>MYEXIT.int (Windows), or for UNIX: MFJUXIT=<optional location specification>MYEXIT.so.

    The source for the sample exit is available in %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\src\enterpriseserver\exits (Windows) or $COBDIR/src/enterpriseserver/exit (UNIX).

    We recommend you use this as the base to build an exit to suit your needs. It uses a copybook for the user exit interface block. The source for this copybook (mfjdxit.cpy) is in %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\cpylib (Windows) or $COBDIR/cpylib (UNIX) . A listing of mfjdxit.cpy is provided in the section under User Exit Interface Block (mfjdxit.cpy).

  • The user exit must use the ASCII (ANSI) character set. We recommend that it uses the non-mainframe COBOL dialect "MF".
  • The user exit is optional. It may reside in any folder accessible to the dynamic program loader, or an alternative location may be set explicitly with the MFJUXIT environment variable. If the MFJUXIT environment variable is set, and the specified module is not found, then the region will not start successfully.
  • You must write the user exit in COBOL.
  • Directive NOOUTDD should be specified.
Previous Topic Next topic Print topic