* interface. The script will exit the loop after either 120 seconds has
* elapsed or the IOSHM0414I message is successfully captured.
* IOSHM0414I message is successfully obtained.
*/
do forever
/*
* Invoke YKCONMSG again, but this time with the OP(GET) parameter
* and the hander value so that the IOSHM0414I message can be
* captured.
*/
dc = OUTTRAP("MyHandle.")
address TSO "YKCONMSG",
"OP(GET) HANDLE(x'"HandlerValue"')"
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. */
290 CLI Commands
Содержание P9000
Страница 302: ...YKDEMO12 302 CLI Commands ...