The EDH_STATUS command is used to control the status of the replication process, in a punctual or periodic way. It must be integrated into a CLP program that will periodically determine what steps to undertake regarding received messages.
The command prompt displays the following parameters:
EDH - Status of replication (EDH_STATUS)
Type choices, press Enter
Environment . . . . . . . . . __ Nam Environment type . . . . . . *SND *SND, *RCV Delay before alert . . . . . . . 60 10-3600 |
The environment code is required.
Upon running the command, several different controls will be done:
Check current activity of the environment
Check the delay reading journals
Check the number of objects out of sync
Depending on different cases met, different messages are produced:
INACTIVE replication
EDH0038 – Environment &1 is NOT ACTIVE
This message is directly sent to the caller program, as an “Escape” mode with severity 40. The caller program can decide to immediately restart the environment using the command PMEDHSTR.
Delay greater than 60 seconds
EDH0040 – CAUTION : DELAY on environment &1 => &2 seconds
This message is sent to message queue PMEDHUSR/PMEDH, as a « Diagnostic » message, with severity 40
At least 1 object out of sync – 2 messages:
EDH0041 – CAUTION : There are &2 objects WAITING FOR SYNCHRONIZATION on environment &1.
EDH0117 - CAUTION - There are &é objects OUT OF SYNC for environment &1. Those messages are sent to message queue PMEDHUSR/PMEDH, as « Diagnostic » messages, with severity 40.
2 synthesis messages regarding the active environments:
EDH0190, of severity 00, if there is no replication delay and no objects waiting or in error of synchronization.
EDH0191, of severity 40, if there is replication delay and/or objects waiting and/or in error of synchronization.
Sample message:
Message ID . . . . . . : EDH0191 Severity . . . . . . . : 40
Message type . . . : Information
Date sent . . . . . : 30/09/14 Time sent . . . . : 18:51:05
Message . . . . : EDH_STATUS: Environment BK ACTIVE
Delay : 000000000
Objects waiting : 000000000
Errors : 000000008
Note: The 6 messages of obvious problems are deliberately sent to the message queue PMEDHUSR/PMEDH. Therefore, the tool included in PMEDHTOOLS, or any other message monitoring tool can easily intercept the messages and act consequently.
Furthermore, a *DTAARA is updated with this information.
The *DTAARA is named EDH_xx in PMEDHUSR (xx= environment code) and is filled in as follows (Position | Length 🡪 Information):
| 275 | 6 | CURDAT, date of command execution |
|---|---|
| 281 | 6 | CURTIM, time of command execution |
| 257 | 9 | W_DLYA, reading delay |
| 401 | 9 | Reading delay in seconds |
| 410 | 1 | Unit of reading delay given in pos 257 ('d', 'h', 'm' or 's') |
| 266 | 9 | W_ERRA, number of objects in sync error |
| 291 | 9 | W_WAIA, number of objects awaiting synchronization |
| 301 | 9 | W_WNBA, number of sync OK |
| 311 | 9 | W_RUNA, number of synchronization in progress |
| 321 | 1 | NOIO (0 = I / O, 1 = 1 NO I / O) |
| 322 | 1 | NOJRN (0 = JRN, 1 = 1 NO JRN) |
| 323 | 1 | Env active (0 = env stopped, 1 = env started) |
| 411 | 9 | Write delay |
| 412 | 1 | Unit of write delay given in pos 411 ('d', 'h', 'm' or 's') |
| 421 | 9 | Write delay in seconds |
| 431 | 9 | Number of entries in progress |
So you can build a CLP, for example, to stop replication only if there is no delay:
Run the command EDH_STATUS
Read the DTAARA – Position 257 to 265 on 9 positions
If greater than 0 – do a DLYJOB and loop on EDH_STATUS
If equal to 0 – Do a PMEDHEND xx and end of program
From December 2011 releases, EDH_STATUS also produces a report spool file.
Attention: When an environment is switched off (use 323 | 1 Env active to check) , the values reported are the last recorded by EDH_STATUS for the read delay and for the write delay. These values won’t match to the current display which is dynamic