HP P9000 Business Continuity Manager Reference Guide (T5253-96058, September 2011)

Table Of Contents
if rc /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
/*
* Use YKWATCH to let BC Manager notify the state transition of MYTCS
* when it became DUPLEX. You may use YKWATCH for other copy group
* statuses, too.
* In this example, YKWATCH monitors MYTCS copy group to become
* DUPLEX for 30 minutes, and notifies a user about such status
* transition by sending a notification message to the current user's
* console.
*/
call "YKWATCH" "PREFIX(BCM.DEMO) GROUP(MYTCS) GOTO(DUPLEX)",
"TIMEOUT(30) DAD(PRIM)";
/*
* Check the return code to see if it is 0 or not.
*/
if result /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
say "#-- END YKDEMO06.";
exit;
/*
* printErrorMessage: This procedure prints all of the error messages
* in the Message structure when a CLI command failed.
*/
printErrorMessage: procedure expose DEMO_MSG.
do x = 1 to DEMO_MSG.0
say "Severity = " || DEMO_MSG.x.Severity;
say "Text = " || DEMO_MSG.x.Text;
say "Value = " || DEMO_MSG.x.Value;
end;
return 0;
YKDEMO07
/* REXX */
/**********************************************************************/
/* */
/* All Rights Reserved. Copyright (C) 2007, 2010, Hitachi, Ltd. */
/* */
/**********************************************************************/
/* */
/* YKDEMO07 - A sample demonstration script that illustrates how to */
/* use the Business Continuity Manager's YKRECVER command. */
/* */
/* This sample script assumes the following settings. */
/* */
/* 1) The definition files are stored in the dataset with the */
/* prefix "BCM.DEMO". */
/* 2) TC-Sync copy group is used. The copy group ID is "MYTCS". */
Command details 281