[z/OS]

ARCHIVE LOG (back up the active log) on z/OS

Use the MQSC command ARCHIVE LOG as part of your backup procedure. It takes a copy of the current active log (or both logs if you are using dual logging).

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

You can issue this command from sources 12CR. For an explanation of the source symbols, see Sources from which you can issue MQSC commands on z/OS®.

Synonym: ARC LOG

ARCHIVE LOG

Read syntax diagramSkip visual syntax diagram ARCHIVE LOG MODE(QUIESCE)TIME(nnn)WAIT(NO)WAIT(YES)CANCEL OFFLOADCMDSCOPE(' ')CMDSCOPE(qmgr-name)1
Notes:
  • 1 Valid only on z/OS when the queue manager is a member of a queue sharing group.

Usage notes for ARCHIVE LOG

ARCHIVE LOG performs the following actions:
  1. Truncates the current active log data sets.
  2. Continues logging, switching to the next active log data set.
  3. Starts a task to offload the data sets.
  4. Archives previous active log data sets not yet archived.
If the MODE(QUIESCE) parameter is used, the ARCHIVE LOG command quiesces (suspends) all user update activity on the current active log before the offload process. Once a system-wide point of consistency is reached (that is, when all currently active update users have reached a commit point), the current active log data set is immediately truncated, and the offload process is initiated. The resulting point of consistency is captured in the current active log before it is offloaded.

Normally, control returns to the user immediately, and the quiescing is done asynchronously. However, if the WAIT(YES) parameter is used, the quiescing is done synchronously, and control does not return to the user until it has finished.

  • You cannot issue an ARCHIVE LOG command while a previous ARCHIVE LOG command is in progress.
  • You cannot issue an ARCHIVE LOG command when the active log data set is the last available active log data set, because it would use all the available active log data set space, and IBM® MQ would halt all processing until an offload had been completed.
  • You can issue an ARCHIVE LOG command without the MODE(QUIESCE) option when a STOP QMGR MODE(QUIESCE) is in progress, but not when a STOP QMGR MODE (FORCE) is in progress.
  • You can issue a DISPLAY LOG command to discover whether an ARCHIVE LOG command is active. If an ARCHIVE LOG command is active, the DISPLAY command returns message CSQV400I.
  • You can issue an ARCHIVE LOG command even if archiving is not being used (that is, OFFLOAD is set to NO in the CSQ6LOGP system parameter macro), or dynamically using the SET LOG command. In this case, the current active log data sets are truncated and logging continues using the next active log data set, but there is no offloading to archive data sets.

Parameter descriptions for ARCHIVE LOG

All the parameters are optional. If none are specified, the current active log data sets are switched and offloaded immediately.

CANCEL OFFLOAD
Cancels any offloading currently in progress and restarts the offload process. The process starts with the oldest active log data set and proceeds through all the active data sets that need offloading.

Use this command only if the offload task does not appear to be working, or if you want to restart a previous offload attempt that failed.

CMDSCOPE
This parameter specifies how the command runs when the queue manager is a member of a queue sharing group.
CMDSCOPE cannot be used for commands issued from the first initialization input data set CSQINP1.
' '
The command runs on the queue manager on which it was entered. This is the default value.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

You can specify a queue manager name, other than the queue manager on which the command was entered, only if you are using a queue sharing group environment and if the command server is enabled.

MODE(QUIESCE)
Stops any new update activity on the queue manager, and brings all existing users to a point of consistency after a commit. When this state is reached, or the number of active users is zero, the current active log is archived.

The time that the queue manager waits to reach such a state is limited to the value specified by QUIESCE in the CSQ6ARVP system parameter macro. The value of QUIESCE can be overridden by the TIME parameter of this command. If activity has not quiesced in that time, the command fails; no offload is done, and logging continues with the current active log data set.

TIME( nnn )
Overrides the quiesce time period specified by the QUIESCE value of the CSQ6ARVP system parameter macro.

nnn is the time, in seconds, in the range 001 through 999.

To specify the TIME parameter, you must also specify MODE(QUIESCE).

If you specify the TIME parameter, you must specify an appropriate value for the quiesce period. If you make the period too short or too long, one of the following problems might occur:
  • The quiesce might not be complete
  • IBM MQ lock contention might develop
  • A timeout might interrupt the quiesce
WAIT
Specifies whether IBM MQ is to wait until the quiesce process has finished before returning to the issuer of the ARCHIVE LOG command.
To specify the WAIT parameter, you must also specify MODE(QUIESCE).
NO
Specifies that control is returned to the issuer when the quiesce process starts. (The synonym is N.) This makes the quiesce process asynchronous to the issuer; you can issue further MQSC commands when the ARCHIVE LOG command returns control to you. This is the default.
YES
Specifies that control is returned to the issuer when the quiesce process finishes. (The synonym is Y.) This makes the quiesce process synchronous to the issuer; further MQSC commands are not processed until the ARCHIVE LOG command finishes.