DIF has an interface to the MVS System Logger. For an overview of the MVS System Logger, examine “Chapter 9. Planning for System Logger Applications” in the “OS/390 MVS Setting Up a Sysplex” (GC28-1779).
This interface allows the products to:
- write messages and records to the system logger.
- consolidate messages and records from DIF address spaces on multiple systems and write the data to a single log file.
Logging product data to the System Logger
Messages and records written by the rules language can be routed to the
system logger using the DEFCONN rule statements. A
DEFCONN statement maps a DDname
requested by the WRITEREC and WRITEMSG
statements to an MVS System Logger stream name. An application is
provided that can be used to extract the data for later processing. For
more information about the extract program, examine “The Message Facility Print Program -DIFMFPRT” on page 3-38.
Using the System Logger to consolidate log data
The system logger can also be used to establish a communication link between the DIF started tasks in a sysplex. One DIF address space is designated as the logserver, and the other DIF address spaces can pump log data to the logserver DIF using the system logger as temporary storage. The logserver DIF can then write or update records in the “real” log files.
DIF also has an interface to the IBM MQSeries commercial messaging facility. This facility has even more capabilities than the MVS System Logger interface, but it is not available at all installations and can be somewhat difficult to install. If the product is available, MQSeries allows DTS products to establish communication links with other computers, even machines outside the sysplex, and move information between the machines. For more information, examine “The MQSeries Interface” on page 4-17.
Implementation — The MVS System Logger can be used by the products in two ways: as a repository for user log records, and as a facility where log file updates can be consolidated through a single DIF.
Message and Record Logging
DIF has always had the ability to write log messages and records from a product’s rules language to log files. Originally, this log facility was developed to provide an alternative to the SMF interface used by ACC/SRS. Since most installations typically have a great deal of SMF data, processing SMF data to extract a limited number of SRS recovery messages seemed unreasonable. Instead, DTS provided log data sets allocated in the DIF address space to route SRS recovery messages or other messages of interest. In short, one quick look at a log file would give a storage administrator a summary of the SRS recoveries that occurred the night before.
Many DTS customers took the event logging capabilities of the SCC products much further than originally intended. Also, the original DIF log architecture requires that each system maintain its own set of DIF log files. In large sysplex environments, this creates a data management problem. Any post-processing on the logs requires an application to merge log files produced by many different systems.
IBM also had many products that contained similar logging facilities: CICS, OPERLOG, LOGREC, APPC/MVS and IMS. In recent years, IBM generalized the log interface to be shared by these and any other vendor and/or user application. DTS products can also use the MVS System Logger, which is now available on all OS/390 systems.
The DIF interface to the system logger is very easy
to establish, and can be completely transparent to the SCC product rules
already developed by your installation. To route messages and/or records
to the system log, establish a connection with the
DEFCONN command or DEFCONN statement.
While the statement can be placed in a product’s rules language, it would
normally be executed external to the rules with the EXEC
CONNECT statement used in DIFINIT.
For example, use the DTS.R71.PARMLIB(DIFINIT) member to
execute an EXEC(CONNECT(member)) command. The
DEFCONN commands processed by EXEC
CONNECT establish the connection to reroute messages and
records to an MVS system logger stream name. For
example, DIFINIT might contain:
INITOPT EXEC(CONNECT(LOGINIT))
The LOGINIT member should contain the
DEFCONN statements required to route specific log data
to the system logger. The LOG option can be specified on
the DEFCONN statement to copy log records to both the
local DD statement as well as the system logger stream. A sample
DTS.R71.PARMLIB(LOGINIT) member follows:
DEFCONN ACCLOG LOGGER(DTS.LOGGER.STREAM)
DEFCONN SCCACL LOGGER(DTS.LOGGER.STREAM LOG)
Since all DIF started tasks probably share the same
DIF PARMLIB DD statement, this simple change should
activate the system logger facility for the ACCLOG and
SCCACL files.
Using the System Logger to Consolidate Log Records
When multiple DIF address spaces are active in your sysplex, the system logger can be used to consolidate log records to a single data set. Multiple systems can be writing messages to the logger’s stream name, but one DIF can be assigned to extract the messages from the system logger and then write the records to the log data set.
ABC provides a perfect example. If ABC is running on multiple systems in your sysplex to track data set usage for ABARS backups, record updates can be routed to the log server DIF which has control of the ABCVSAM database. Without consolidated updates, each image in the sysplex would require an associated ABCVSAM database to avoid VSAM share problems, and each ABC utility would have to merge input data from multiple databases.
In the following example, the system logger is used to perform log
record consolidation. The DIF commands would be placed
in the DIFINIT member in
DTS.R71.PARMLIB. In the example, log records are routed
through the system logger to SYSA which will be the log
server used for record consolidation.
SYSID(EXCLUDE(SYSA))
INITOPT EXEC(CONNECT(LOGINIT)) SYSID(INCLUDE(SYSA))
INITOPT LOGSERVER(LOGGER(DTS.STREAM)) SYSID()
The first SYSID section executes on all systems except
SYSA and would execute the DEFCONN
commands in member LOGINIT to establish connectors which
route records to the system logger. The LOGINIT contains
the DEFCONN commands to capture an I/O request made to a
DDname, and reroute records to a logger stream. For
more information, examine “EXEC” on page 6-9 in the
Product Installation Guide. Note: No DD
statements for the logs are required in these DIF
started tasks unless the LOG parameter is specified on
DEFCONN statements. A sample
DTS.R71.PARMLIB(LOGINIT) member:
DEFCONN ACCLOG LOGGER(DTS.STREAM)
DEFCONN ABCDB LOGGER(DTS.STREAM)
DEFCONN RTMDB LOGGER(DTS.STREAM)
The second SYSID section would only execute on
SYSA and activates the log server to gather records
from the system logger and write them to the target logs. For more
information, examine “LOGSERVER” on page 6-11 in the
Product Installation Guide. The last SYSID()
terminates conditional command processing.
DD statements for the log files must be allocated
to the LOGSERVERDIF. However, if you wish to maintain only one
DIF PROC, the DD statements can be
added to the DIF PROC but will only be opened by the
LOGSERVER.Setup Required to use the System Logger
The OS/390 System Logger is currently used by many system components: CICS, OPERLOG, LOGREC, APPC/MVS and IMS. By default, most OS/390 systems will have the system logger installed and running.
The setup steps required to use the system logger with DTS products requires only the definition of a log stream name. There are two types of streams available for system logs: DASD-only log streams and coupling facility log streams. A DASD-only log stream has a single-system scope; only one system at a time can connect to a DASD-only log stream.
Therefore, DASD-only logs would not normally be used with DTS products in a sysplex environment. A coupling facility log stream can contain data from multiple systems, allowing a system logger application (DIF) to merge data from systems across the sysplex.
The following sample JCL can be used to define a new structure and
coupling facility log stream to the system logger. The sample JCL can be
found in the DIF sample distribution library:
DTS.R71.SLyyddd.SAMPLIB(IXCMIAPU). Fields represented
in bold type may need to be modified before submission.
//jobname JOB ... (RC=0 EXPECTED)
//STEP1 EXEC PGM=IXCMIAPU
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DATA TYPE(LOGR) REPORT(YES)
DEFINE STRUCTURE NAME(DTS_STRUCTURE) LOGSNUM(32)
DEFINE LOGSTREAM NAME(DTS.STREAM) STRUCTNAME(DTS_STRUCTURE) LIST
LOGSTREAM NAME(DTS.STREAM) DETAIL(YES)
LIST STRUCTURE NAME(DTS_STRUCTURE) DETAIL(YES)
//*
Figure 4-1. JCL to Create a System Logger Streamname