Example of how to use the XLGSTRM exit

The XLGSTRM exit is used for selecting alternative model log streams.

Suppose that 200 CICS® regions are running on 20 MVS™ images; To avoid having to define explicitly each log stream used by each CICS region, you decide to use model definitions. Log streams will be defined to MVS dynamically on their first usage, with an XLGSTRM exit program being used to select from alternative model log streams. This is how it might work:
  1. On an initial start of a CICS region, the INITPARM system initialization parameter specifies:
    INITPARM=(Exit_enabler_pgmname=nnn)
    where:
    • Exit_enabler_pgmname is the name of the program that enables the XLGSTRM user exit program.
    • nnn is a number that identifies a group of CICS regions that share the same set of log stream models.
  2. The program that enables the XLGSTRM user exit program issues an EXEC CICS ASSIGN INITPARM command to retrieve the value nnn, and places it in the exit program's global work area.
  3. When the region tries to connect to its system log, because the log stream is not defined the XLGSTRM exit program is invoked. The exit program selects model CICS.DFHLOG.MODELnnn.