Writing your own exit

To provide your own exit in COBOL, you can use the sample members FMNCRAEX and FMNCRACJ. To do this:

  1. Code your own version of FMNCRAEX in your source library, using FMNCRAEX from FMN.SFMNSAM1 as a base.
  2. Modify the sample job FMNCRACJ in FMN.SFMNSAM1 to meet your site's requirements. Refer to the sample job for information about any changes you might need to make.
  3. Modify the TEST program in FMNCRACJ as required.
  4. Run FMNCRACJ to verify your exit.
  5. When you are satisfied with the testing of your exit using FMNCRACJ, link edit your version of FMNCRAEX into a load library available to File Manager. If you installed File Manager into the default libraries this will be FMN.SFMNMOD1.

The COBOL sample exit is described in detail in The library management system exit.

To provide your own exit in another high-level language or High Level Assembler, code your own version of FMNCRAEX in your own source library, compile it and link edit it into a load library available to File Manager. If you installed File Manager into the default libraries this will be FMN.SFMNMOD1.

If you link edited your version of FMNCRAEX into your own load library, you might want to add this library to the STEPLIB DD statement in the batch JCL skeleton, for use in batch jobs. For more information about the batch JCL skeleton, see Changing the JCL skeleton for batch mode.

If you want to test your exit before making it generally available in production, link edit your version of FMNCRAEX into your own load library and use the TSOLIB command to activate your own load library. Refer to the z/OS TSO/E Command Reference, for information about the TSOLIB command.

If the CONCATD command is available on your system, you can add your load library to the ISPLLIB concatenation using the TSO command:
CONCATD F(ISPLLIB) DA(your.loadlib) SHR BEFORE
Note:
  1. Some LMSs require that code calling them, or the data structures passed to them, or both, be below the 16 MB line. If that is the case, you must provide the appropriate compiler and link edit options.
  2. If you are using FMNCRAEX, you cannot run File Manager APF-authorized.
  3. See Writing the exit in HLASM for other considerations when writing your exit in HLASM.