Previous Topic Next topic Print topic


User Exit Invocation, Rules, and Guidelines

The user exit, which must be named MFJUXIT, is optional and is invoked as follows:

CALL 'MFJUXIT' USING JXIT

where JXIT is the user exit interface block (mfjdxit.cpy). 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 of the event codes, actions codes, and the 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:
  • The Event-job-ready event occurs only in the normal SEP, not in the batch initiator SEP.
  • Event-job-concluded event occurs in the normal SEP only if the job is not intended for execution (that is, it has TYPRUN=COPY or TYPRUN=SCAN) or it has 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. The source for the sample exit is available in %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\source. We recommend you use this as the base to build an exit to suit your needs. It uses a copybook for JXIT (the user exit interface block). The source for this copybook (mfjdxit.cpy) is in %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\source . A listing of mfjdxit.cpy is provided in the section 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" as it is a PC-specific program.
  • The user exit is optional. The .int, .gnt or .dll file for the user exit must be placed in %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\source.
  • You must write the user exit in COBOL.
  • Directive NOOUTDD should be specified.
Previous Topic Next topic Print topic