Archiving z/OS log streams


RUV reads recovery information from Transaction Server log streams and records the recovery information to one or more RUV archives. All output archives are registered in the RUV repository.

You must archive z/OS log streams before they can be used for RUV recovery. If you use the RUV UOW feature, both the system log and the user journal (log stream) must be captured in separate RUV Archive requests. For UOW processing, you should use the AUTODELETE(NO) and RETPD(dddd) z/OS parameter to preserve system log data.

Note

To allow RUV to capture the necessary data from the system log, the RETPD(dddd) value must be 1 or greater.

RUV allows you to make more than one copy of the data with a single pass. RUV also assists you with log stream management by optionally deleting data that has been captured for archive. The log streams should be archived on a regular basis to reduce the amount of time required for a recovery.

This topic contains the following information:

Using the ARCHIVE LOG_STREAM_IN command

To archive log streams, use the ARCHIVE LOG_STREAM_IN command, as shown in the following example.

ARCHIVE LOG_STREAM_IN(TS.J03)
    ARCHIVE_OUT(ARCHOUT)
    UNIT_OF_WORK_OUT(OUWOUT)
    ;

The user journal data on the named log stream will be directed to the ARCHIVE_OUT data set. The system log data for a UOW will be directed to UNIT_OF_WORK_OUT data set.

Using the LOG_STREAM_IN keyword

Use the required LOG_STREAM_IN keyword on the ARCHIVE command to identify the z/OS log stream that contains the data to archive. Set the LOG_STREAM_IN value to the fully qualified log stream name.

Using the VIEW keyword

Use the optional VIEW keyword on the ARCHIVE LOG_STREAM_IN command to select log stream data that has been deleted. Log stream records are retained based on the value of the z/OS RETPD(dddd) parameter. The dddd value is the number of days for which data is to be retained. A record is active unless it is deleted by an application.

Set one of the following values. The default is ACTIVE.

  • ACTIVE
    Archive only records that are not deleted
  • ALL
    Archive both active and inactive records

The RUV VIEW keyword is compliant with the IBM log stream function. For more information, see the IBM log stream documentation.

Using the DELETE keyword

Use the optional DELETE keyword on the ARCHIVE LOG_STREAM_IN command to control whether RUV deletes the input log stream data when the archive process completes successfully. Set one of the following values. The default value is NO.

  • NO
    Do not delete the input log stream data.
  • YES
    Delete the input log stream data when the archive process completes successfully. RUV deletes all blocks that were created by Transaction Server except for the last block. RUV leaves the last block in the log stream and records the block ID in the repository. It uses this information to check for GAP when the next archive runs.

When you are archiving the DFHLOG, specify the DELETE(NO) keyword. It is impossible to do an emergency restart when the keyword is set to DELETE(YES).

Using the GAP keyword

Use the optional GAP keyword on the ARCHIVE LOG_STREAM_IN command to specify the action to be taken when RUV detects missing data.

Set one of the following values. The default value is STOP.

  • STOP
    Stop processing the log stream. After you analyze the cause of the gap and determine that the process needs to continue, you can rerun the process with the WARN or IGNORE value.
  • WARN
    Produce a message, generate return code 4, and continue processing.
  • IGNORE
    Produce a message, generate return code 0, and continue processing.

Using the COMPLETE_COPY keyword

Use the optional COMPLETE_COPY keyword on the ARCHIVE JOURNAL_IN command to copy the data from the journal in its original format, as well as copying the recovery data in RUV format. You should use the COMPLETE_COPY keyword only at the request of Product Support. See Using the COMPLETE_COPY Keyword.

Using the ARCHIVE_OUT keyword

Use the required ARCHIVE_OUT keyword on the ARCHIVE LOG_STREAM_IN command to identify the data set to contain the output archive data. Set the value to the ddname of the data set in the JCL. You can have RUV create multiple copies of the output archive by coding multiple ARCHIVE_OUT keywords. RUV registers all output archives in the repository.

Using the UNIT_OF_WORK_OUT keyword

Use the optional UNIT_OF_WORK_OUT keyword on the ARCHIVE LOG_STREAM_IN command to identify the data set to contain the output UOW archive data. This keyword is required if the archive will be used for a UOW recovery. Set the value to the ddname of the data set in the JCL.

Using Optional Output keywords

You can use the following optional keywords with the ARCHIVE_OUT and UNIT_OF_WORK_OUT keywords:

Code these keywords and their values after the ddname value but before the closing parenthesis for the ARCHIVE_OUT value. Only one archive copy should have an active status.

Coding ARCHIVE LOG_STREAM_IN statements

To code an ARCHIVE LOG_STREAM_IN statement, use the following syntax:

ARCHIVE LOG_STREAM_IN(lsn26)
    { VIEW(ALL | ACTIVE)}
    { DELETE (NO | YES) }
    { GAP(STOP | WARN | IGNORE) }
    { COMPLETE_COPY }
    { VIEW(ACTIVE | ALL) }
    ARCHIVE_OUT( ddn8
    { COMMENT(comment_fields) }
    { LOCATION(location_name8) }
    { STATUS(ACTIVE | INACTIVE) }
    { MUST_COMPLETE (YES | NO) }
    )
  { UNIT_OF_WORK_OUT(ddn8) }
    { COMMENT(comment_fields) }
    { LOCATION(location_name8) }
    { STATUS(ACTIVE | INACTIVE) }
    { MUST_COMPLETE (YES | NO) }
    { ARCHIVE_OUT(ddn8, .. }
    ;


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*