Defining a logrec log stream

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.

The following steps describe how to use a coupling facility logrec log stream in place of a logrec data set:
  1. Define a log stream named SYSPLEX.LOGREC.ALLRECS using the system logger log stream definition utility, IXCMIAPU.
    IFBLSJCL (see Figure 1) is available in SYS1.SAMPLIB as an example of using the administrative data utility, IXCMIAPU, to define the coupling facility logrec log stream to a sysplex.
    Figure 1. Example: Sample JCL of using IXCMIAPU
    //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)
    /*
    Note: MAXBUFSIZE must be at least 4068 because logrec writes records in one page blocks. Specify SMS storage group, storage, data and management classes such that when one data set is full, another is allocated. Allocate as much space as is allocated for all the logrec data sets on the systems in the sysplex before migrating to a logrec log stream.

    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.

  2. Either specify LOGREC=LOGSTREAM in the IEASYSxx parmlib member or, after IPLing with LOGREC=dsname, use the SETLOGRC command to change the logrec recording medium to a logrec log stream. In general, any records written to any logrec data sets before changing to a logrec log stream must be read by a separate EREP job. However, the MERGE option can be used to combine logrec output from the logstream with a logrec data set in a single EREP job. If you IPL the system with LOGREC=LOGSTREAM, you cannot use the SETLOGRC command to change the logrec recording medium to a logrec data set.
  3. Change the EREP job stream as follows:
    • Change the SERLOG DD DSN=SYS1.LOGREC statement associated with a logrec data set to an ACCIN DD DSN=SYSPLEX.LOGREC.ALLRECS statement, with corresponding SUBSYS parameters, to associate EREP with the logrec log stream. The SUBSYS parameters are described in Obtaining records from the logrec log stream.
    • Identify the input as a history data set. Leave the output to a history data set as currently recommended, because all subsequent steps should already use the history data set as input.
      Note: Using a logrec log stream as input for multiple steps is not recommended because each subsequent step processes more records than the prior, causing numbers and data in successive reports not to match.
    • Subsequent EREP report steps that normally process history data sets no longer need to concatenate one history data set per system.
For more information, see the following documentation: