address TSO "YKQUERY STEM(DEMO_INFO.) MSG(DEMO_MSG.)";
/*
* Check the return code to see if it is bigger than 8.
*/
if rc > 8
then do
call printErrorMessage;
exit;
end;
else
nop;
/*
* Establish all copy pairs in MYTCS copy group into DUPLEX. This is
* for demonstration purpose only. In reality you may already have a
* copy group up and running so that you do not have to use YKMAKE
* before YKWATCH.
*/
address TSO "YKMAKE STEM(DEMO_INFO.) MSG(DEMO_MSG.) SELECT(COND)";
/*
* Check the return code to see if it is 0 or not.
*/
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.
*/
284 CLI Commands
Содержание P9000
Страница 302: ...YKDEMO12 302 CLI Commands ...