End Directory Shadowing (ENDDIRSHD)

The End Directory Shadowing (ENDDIRSHD) command ends the directory shadow controlling job in the system work subsystem (QSYSWRK).

Any active collector or supplier jobs running are allowed to complete. No new collector jobs are started. Supplier jobs are prevented from starting if a collector system requests data through directory shadowing. The Start Directory Shadowing (STRDIRSHD) command can be used to re-start directory shadowing.

Restriction: You must have job control (*JOBCTL) authority to use this command.

Parameters

Keyword Description Choices Notes
OPTION How to end *CNTRLD, *IMMED Optional, Positional 1
DELAY Controlled end delay time 1-999999, 30 Optional, Positional 2

How to end (OPTION)

Specifies whether the directory shadow controlling job is ended in a controlled manner or immediately.

*CNTRLD
The directory shadow controlling job is ended in a controlled manner. This allows the directory shadow controlling job to perform cleanup (end-of-job processing).
*IMMED
The directory shadow controlling job is ended immediately. The directory shadow controlling job is not allowed to perform any cleanup.

Note: Using the *IMMED option can cause unexpected results if data has been only partially updated.

This is a required parameter.

Controlled end delay time (DELAY)

Specifies the amount of time (in seconds) allowed for the directory shadow controlling job to complete its cleanup processing during a controlled end. This parameter is not valid if OPTION(*IMMED) is specified. If the cleanup is not complete before the end of the delay time, the directory shadow controlling job is immediately ended.

30
A maximum delay time of 30 seconds is allowed for cleanup before the directory shadow controlling job is ended.
delay-time
Specify the maximum amount of delay time in seconds before the directory shadow controlling job is ended. Valid values range from 1 through 999999.

This is a required parameter.

Examples

Example 1: Ending Directory Shadowing in a Controlled Manner

ENDDIRSHD   OPTION(*CNTRLD)  DELAY(60)

The directory shadow controlling job is ended in the system work subsystem in a controlled manner and will have 60 seconds to complete its end-of-job processing.

Example 2: Ending Directory Shadowing Immediately

ENDDIRSHD   OPTION(*IMMED)

The directory shadow controlling job is ended in the system work subsystem immediately. The directory shadow controlling job does not perform end-of-job processing.

Error messages

*ESCAPE Messages

CPF89A9
Unable to end job that controls directory shadowing.