/* */
/**********************************************************************/
/* Sample script begins. */
say "#-- BEGIN YKDEMO02.";
address TSO "YKENV"
/*
* The following piece of code attempts to detect completion of
* the copy process of FlashCopy pair by using YKFCSTAT.
* If the copy process has not completed yet, the value of "STATE0"
* remains non-zero, so it waits for certain amount of time (in this
* example, 1 minute) and re-attempt to detect completion of the
* copy process. This cycle will continue for 10 times unless
* completion of the copy process is detected.
*/
outFlag = "INLOOP";
do i = 1 to 10 while (outFlag == "INLOOP")
/*
* Use YKFCSTAT command to view the current status of the
* FlashCopy processing. You may choose a volume from which
* the status information of the current FlashCopy processing
* is retrieved by specifying a device number of a volume with
* "DEVN" parameter, such as "DEVN(12AB)".
*/
address TSO "YKFCSTAT STEM(DEMO_INFO.) MSG(DEMO_MSG.) DEVN(####)";
/* Check the return code of YKFCSTAT to see if it is 0 or not. */
if rc /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
/*
* DEMO_INFO.TARGET.STATE0 shows the status of a FlashCopy pair.
* STATE0 = 0 means that there is no FlashCopy relationship so that
* the TrueCopy pairs can be resynchronized.
*/
if DEMO_INFO.TARGET.STATE0 = 0
then
outFlag = "OUTLOOP";
else do
/* Wait for 1 minute and re-enter the loop for YKFCSTAT. */
address TSO "YKSLEEP MIN(1)";
if rc /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
end;
end;
if i > 10
then
say "FlashCopy processing has not completed.";
else
say "FlashCopy processing has completed.";
270 CLI Commands
Содержание P9000
Страница 302: ...YKDEMO12 302 CLI Commands ...