Before defining a logrec log stream, note that IBM® recommends that you IPL with a logrec data set initialized by IFCDIP00. If you do not IPL with a data set, you cannot change the logrec recording medium from LOGSTREAM to DATASET using the SETLOGRC command.
To use the logrec log stream, you must first prepare your installation to use system logger functions. IBM recommends that you use a coupling facility log stream for LOGREC so that you can merge data from multiple systems in a sysplex.
To obtain logrec records for a single system sysplex, you can also use a DASD-only log stream, which is single system in scope. Note that this is not recommended for a multi-system sysplex, because you can only have one logrec log stream per sysplex. This means that if you make your logrec log stream DASD-only, only one system will be able to access it. See the system logger chapter of z/OS MVS Setting Up a Sysplex for information on DASD-only log streams.
See z/OS MVS Setting Up a Sysplex for more information.
//IFBLSJCL JOB
//* Member Name: IFBLSJCL *
//* Descriptive Name: *
//* Sample JCL to provide an example of using the System Logger *
//* utility to define the Logrec log stream to a sysplex. *
//* Function: *
//* This JCL sample provides an example of running the System *
//* Logger utility (IXCMIAPU) to define the Logrec log stream *
//* in the logger inventory. *
//* *
//* Note that the MAXBUFSIZE parameter must have at least 4068 *
//* specified, or Logrec will not be able to write to the Log *
//* stream. *
//* *
//* The Logrec log stream name must be specified as *
//* SYSPLEX.LOGREC.ALLRECS. *
//* *
//* Suggested Modifications: *
//* Provide the specifications that are relevant for your *
//* installation on the SYSIN DATA TYPE(LOGR) definition. *
//* For example, the following parameters define the log stream *
//* data set attributes: *
//* *
//* LS_DATACLAS(data class) - Name of data class *
//* LS_MGMTCLAS(management class) - Name of management class *
//* LS_STORCLAS(storage class) - Name of storage class *
//* *
//* Distribution Library: ASAMPLIB *
//* *
//DEFINE EXEC PGM=IXCMIAPU
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DATA TYPE (LOGR)
DEFINE STRUCTURE NAME(LOGRECSTRUCTURE)
LOGSNUM(1)
AVGBUFSIZE(4068)
MAXBUFSIZE(4068)
DEFINE LOGSTREAM NAME(SYSPLEX.LOGREC.ALLRECS)
STRUCTNAME(LOGRECSTRUCTURE)
/*
The most effective way to manage all logrec records is to specify the automatic migration of log data sets to HSM. This automatic migration eliminates the need to create and maintain archival history data sets, with one exception. If the log stream data set directory is full, you can, using SUBSYS-options2 of the LOGR subsystem, copy data from a log stream to a history data set and then delete the copied data from the log stream.