Table of Contents

Search

  1. Preface
  2. Part 1: PowerExchange Change Data Capture Introduction
  3. Part 2: CDC Components Configuration and Management
  4. Part 3: CDC Sources Configuration and Management
  5. Part 4: Change Data Extraction
  6. Part 5: Monitoring and Tuning
  7. Appendix A: CDC for z/OS Troubleshooting
  8. Appendix B: DTL__CAPXTIMESTAMP Time Stamps

DEFINE_LOG Command

DEFINE_LOG Command

The DEFINE_LOG command adds PowerExchange Logger for z/OS log definitions to the emergency restart data set.
Use the DEFINE_LOG command when you need to do one of the following tasks:
  • Define active logs in addition to those created at initial setup
  • Define additional logs
  • Add logs back to archives if they have dropped off or cannot be located
PowerExchange installation creates definitions for at least three active log data sets. You can define additional active log data sets, up to a maximum of 31 active logs.
Consider including DEFINE_LOG control statements in batch jobs that run log maintenance tasks. PowerExchange provides sample JCL for adding active log data set definitions in the #ADDLOGS member of the SAMPLIB library.

Syntax

To define logs, use the following syntax:
DEFINE_LOG|DEFL LOG_DSNNAME=
data_set_name
, TYpe={ACtive|ARchive}, COPY={PRILOG|SECLOG}, STARTRBA=X'
start_rba
', ENDRBA=X'
end_rba
', TODSTATIME=X'
start_time
', TODENDTIME=X'
end_time
' END
Required parameters:
  • LOG_DSNAME and COPY are always required.
  • For archive logs, STARTRBA and ENDRBA are also required.
  • For archive logs in a Post-Log-Merge environment, TODSTATIME and TODENDTIME are also required.
Example of running the DEFINE_LOG command interactively:
F
proc_name
,DEFINE_LOG DSNAME=
data_set_name
,TYPE=ACTIVE,COPY=PRILOG
The interactive mode has a limit of 110 characters. If the length of the DEFINE_LOG command exceeds this limit, you can split the command by adding a comma (,) to the end of the first line.
For example, here is a DEFINE_LOG command split across two lines:
F
proc_name
,DEFINE_LOG DSNAME=
data_set_name
,TYPE=ARCHIVE, F
proc_name
,STARTRBA=X'
start_rba_value
',ENDRBA=X'
end_rba_value
'

Parameter Descriptions

The following table describes the DEFINE_LOG parameters, including the long and short forms of the parameter names:
Parameter
Definition
Valid Values
COPY or C
Indicates which copy of the active log you are defining: the primary log or secondary log.
This parameter is required for all DEFINE_LOG commands.
  • PRILOG
    . Define a primary log data set.
  • SECLOG
    . Define a secondary log data set.
DSN, DSNAME, or LOG_DSNAME
The log data set name. This name must be cataloged.
This parameter is required for all DEFINE_LOG commands.
A data set name up to 44 characters in length.
ENDRBA or ENDR
The RBA of the end of the archive log data set that is specfied in the DSN parameter. To find the end RBA, review messages.
This parameter also requires the STARTRBA parameter.
This parameter is required for archive logs only.
An RBA value in hexadecimal format, beginning with “X” and followed by up to 12 hexadecimal digits enclosed in single-quotation marks. Zero fill if necessary to ensure an even number of digits. For example: X'07BF5F8000'.
The ENDRBA value must be greater than the STARTRBA value.
STARTRBA or STARTR
The RBA of the beginning of the archive log data set that is specified in the DSN parameter. To find the start RBA, review messages.
This parameter also requires the ENDRBA parameter.
This parameter is required for archive logs only.
An RBA value in hexadecimal format, beginning with “X” and followed by up to 12 hexadecimal digits enclosed in single-quotation marks. Zero fill if necessary to ensure an even number of digits. For example: X'08CF6F9022'.
TODENDTIIME or TODE
For a Post-Log-Merge environment, this parameter specifies the timestamp of the end of the archive log that is specified in the DSN parameter.
This parameter is required only for archive logs in a Post-Log-Merge environment. Do not use the parameter if you are defining a new log data set or if you do not use the Post-Log-Merge function.
To find the timestamp for the end of the archive log, review the messages that were generated when the log data set was originally created.
This parameter also requires the TODSTATIME parameter.
A timestamp value in hexadecimal format, beginning with "X" and followed by up to 16 hexadecimal digits enclosed in single quotations marks. Zero fill if necessary to ensure an even number of digits. For example: X'DB484C50183E9817'.
TODSTATIME or TODS
For a Post-Log-Merge environment, this parameter specifies the timestamp of the start of the archive log that is specified in the DSN parameter.
This parameter is required only for archive logs in a Post-Log-Merge environment. Do not use the parameter if you are defining a new log data set or if you do not use the Post-Log Merge function.
To find the timestamp for the start of the archive log, review the messages that were generated when the log data set was originally created.
This parameter also requires the TODENDTIME parameter.
A timestamp value in hexadecimal format, beginning with "X" and followed by up to 16 hexadecimal digits enclosed in single quotations marks. Zero fill if necessary to ensure an even number of digits. For example: X'CA373B49072D8706'.
TYPE or TY
The type of PowerExchange Logger log data set.
  • ACTIVE or AC for an active log
  • ARCHIVE or AR for an archive log

Example 1

This example shows a successful execution of the DEFINE_LOG command, with no errors:
DEFINE_LOG DSNAME=PWXUSR1.ARCHLOG1.PWXL.LG1.D2007331.T1536523, TYPE=ARCHIVE, COPY=SECLOG, STARTR=X'08CF6F9022', ENDR=X'07BF5F7FFF', TODS=X'CA373B49072D8706', TODE=X'DB484C50183E9817' END
The resulting output contains this message, with return code "0" indicating no errors detected:
PWXEDM172576I DEFINE_LOG command ended RC=0

Example 2

This example shows what happens when the DSNAME is not cataloged and some parameters are missing:
DEFINE_LOG DSNAME=PWXUSR1.ARCHLOG1.PWXL.LG1.D2007331.T1536523, TY=AR, C=S END
The resulting output contains these messages:
PWXEDM172749E LOG_DSNAME not cataloged PWXEDM172748W STARTRBA is 0 PWXEDM172749E ENDRBA is 0 PWXEDM172749E TODSTATIME not specified PWXEDM172749E TODENDTIME not specified PWXEDM172576I DEFINE_LOG command ended RC=8

Example 3

This example shows an odd number of hexadecimal digits and a missing end time (TODENDTIME) parameter:
DEFLOG DSNAME=PWXUSR1.ARCHLOG1.PWXL.LG1.D2007331.T1536523, TY=AR, COPY=SECLOG, STARTR=X'08CF6F9022', ENDR=X'07BF5F7FFF', TODS=X'CA373B49072D8706' END
The resulting output contains these messages:
PWXEDM172730E Odd number of hexadecimal digits for TODS PWXEDM172574W Command set and/or input block flushed PWXEDM172740E Command processor was expecting a command, found END PWXEDM172574W Command set and/or input block flushed

0 COMMENTS

We’d like to hear from you!