HP XP P9000 for Business Continuity Manager Software Reference Guide

dc = OUTTRAP("OFF")
/*
* Check the return code of YKCONMSG to see if it is 1 or not.
* YKCONMSG with the OP(GET) parameter returns the return code 1
* if it was able to capture the IOSHM0414I message.
*/
if rc = 1
then do
/*
* Extract the message body from the captured IOSHM0414I string.
*/
parse var MyHandle.1 . IOSHM0414Imsg
/*
* Check to see if the captured IOSHM0414I message is
* generated due to the relevant copy pair in the MYTCHS
* copy group performing a planned or unplanned HyperSwap.
*/
PlannedFound = pos("Planned", IOSHM0414Imsg)
UnplannedFound = pos("Unplanned", IOSHM0414Imsg)
/*
* If a HyperSwap has occurred in the relevant copy pair,
* then resync MYUR2.
*/
if PlannedFound /= 0 | UnplannedFound /= 0
then do
say "#-- IOSHM0414I message was captured."
if UnplannedFound /= 0
then do
/*
* Check the status of the secondary volume that belong
* to the MYTCHS copy pair to see if a DeltaResync
* can be performed.
*/
address TSO "YKEWAIT STEM(DEMO_INFO.MYTCHS.)",
" MSG(DEMO_MSG.) GOTO(SWAPPING)",
" TO(SECONDARY) TIMEOUT(0)"
/*
* Check the return code of YKEWAIT.
*/
if rc /= 0
then do
call printErrorMessage
leave /* Exit the loop. */
end
else
nop
/*
* Suspend the MYUR1 copy pair to change the status of
* MYUR1 into one where a DeltaResync can be performed.
*/
address TSO "YKSUSPND STEM(DEMO_INFO.MYUR1.)",
" MSG(DEMO_MSG.) FLUSH"
/*
* Confirm that the status of MYUR1 copy pair is in a
* status where a DeltaResync can be performed.
Command details 289