There is one exit point, XLGSTRM, in the log manager domain.
You can use XLGSTRM to modify a request to MVS™ to create a new log stream. You can change the model log stream name and other parameters before they are passed to the MVS system logger.
If a log stream connection request from CICS® to the MVS system logger fails because the log stream is not defined to MVS, CICS issues a request to the MVS system logger to create the log stream dynamically, using a model log stream definition.
The model log stream name that CICS passes to MVS depends on whether the journal name refers to the system log or a CICS general log, as follows:
&sysname is the MVS symbol that resolves to the system name of the MVS image. LSN_last_qualifier is the last qualifier of the log stream name as specified on the JOURNALMODEL resource definition.
If you do not provide a JOURNALMODEL resource definition for DFHLOG and DFHSHUNT, or if you use the CICS definitions supplied in group DFHLGMOD, the model log stream names default to &sysname.DFHLOG.MODEL and &sysname.DFHSHUNT.MODEL.
For example, if a CICS region issues a request to create a log stream for its primary system log, and CICS is running in an MVS image with a sysid of MV10 and using the default JOURNALMODEL definition, the MVS system logger expects to find a model log stream named MV10.DFHLOG.MODEL.
If the system name of the MVS image starts with a numeric character and is less than 8 characters long, CICS prefixes it with a "C", so that the model log stream name becomes C&sysname.LSN_last_qualifier. This is because the MVS system logger rejects log stream names that begin with a numeric. If the system name of the MVS image starts with a numeric but is already 8 characters long (the maximum), CICS does not add the "C" prefix, which means that the MVS system logger will reject the default model log stream name. However, your global user exit program can change the model log stream name.
For example, if the CICS region userid is CICSHT## and the APPLID is CICSHTA1, the default model name is CICSHT##.CICSHTA1.MODEL.
The following information is passed to an XLGSTRM global user exit program:
Your exit program can amend the model stream name by updating the field pointed to by the UEPMLSN exit-specific parameter. Here is an example of how your exit program can change the model stream name:
L R3,UEPMLSN R3 = address of stream name
MVC 0(26,R3),=CL26'NEW.MODEL.NAME'
By updating the field pointed to by the UEPIXG parameter, your exit program can amend the IXGINVNT macro parameter list used by the MVS system logger to define the log stream. Use the IXGINVNT MF=M form of the macro, which allows the exit to specify the log stream attributes to be used. Here is an example of how your exit program can change the structure name:
L R9,UEPIXG
IXGINVNT REQUEST=DEFINE,
TYPE=LOGSTREAM,
STRUCTNAME=NEW_STRUCTURE,
MF=(M,(R9),NOCHECK)
...
NEW_STRUCTURE DC CL16'LOG_SYSTEST_009'
You do not need to code the list and execute forms of the IXGINVNT macro, or include the IXGCON or IXGANSAA macros in your exit--these are provided by the CICS code which actually issues the DEFINE request.
For information about the IXGINVNT service, see the OS/390® MVS Authorized Assembler Services manual.
An XLGSTRM global user exit program can set explicit attributes for the log stream definition, and can also set a return code that causes the log stream definition to be bypassed.
Your exit program should not modify the name of the logstream. On return from the exit, CICS ignores any changes to the contents of the field addressed by UEPLSN. JOURNALMODEL definitions are provided to cater for log stream name selection.
For details of the IXGINVNT macro, see the OS/390 MVS Authorized Assembler Services manual.
Imagine that you have 200 CICS regions, running on, say, 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:
The sample program, DFH$LGLS, shows you how to access and change some of the parameters passed to an XLGSTRM exit program. Specifically, it: