HP XP7 Business Continuity Manager Reference Guide (TK954-96004)

outFlag = "INLOOP";
do i = 1 to 10 while (outFlag == "INLOOP")
/*
* Calls the YKQEXCTG command to obtain the EXCTG information for
* MYUR4X4. If the copy direction is the reverse direction, specify
* the TO(PRIMARY) parameter.
*/
address TSO "YKQEXCTG STEM(DEMO_INFO.) MSG(DEMO_MSG.)",
"TO(SECONDARY)";
/* Check the return code of YKQEXCTG to see if it is 0 or not. */
if rc /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
if DEMO_INFO.Exctg2.Info == "Valid"
then do
/*
* Several information items obtained by the YKQEXCTG command
* are displayed here. For details about the information items
* that the YKQEXCTG command can obtain, see the Business
* Continuity Manager Reference Guide.
*/
say "YKQEXCTG End Time : " ||,
DEMO_INFO.Exctg2.EndTime;
say "EXCTG Consistency Time : " ||,
DEMO_INFO.Exctg2.ArbCTTime;
say "EXCTG CTDelta : " ||,
DEMO_INFO.Exctg2.ArbCTDelta;
/* Wait for 10 second and re-enter the loop for YKQEXCTG. */
address TSO "YKSLEEP SEC(10)";
if rc /= 0
then do
call printErrorMessage;
exit;
end;
else
nop;
end;
else do
say "Exctg2 REXX structure is not valid."
outFlag = "OUTLOOP";
end;
end;
say "#-- END YKDEMO13.";
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;
304 CLI Commands