HP XP Command View Advanced Edition Software User Manual
Page 271
/* All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd. */
/* */
/**********************************************************************/
/* */
/* KTDEMO14 - A sample demonstration script that */
/* displays volume I/O statistics. */
/* */
/* This sample script uses the following CLI commands. */
/* - KTLOAD */
/* - KTQSTATS */
/* */
/* This sample script assumes the following settings. */
/* 1) TPG and DSK configuration dataset is already created. */
/* 2) The TPG and DSK dataset name's prefix is PREFIX() option */
/* value in the script's argument. */
/* 3) Tiering Policy Group ID of the TPG configuration dataset is */
/* specified in TPG() option value in the script's argument. */
/* 4) KTQSTATS command interval time is specified in the */
/* INTERVAL() option value in the script's argument. */
/* */
/**********************************************************************/
/* Sample script begins. */
SAY "#-- BEGIN KTDEMO14.";
NUMERIC DIGITS 10 /* Some rexx value exceed 9digits. */
call syscalls('ON'); /* for use address syscall */
/*
* Parse argument specified in the EXEC command.
*/
PARSE UPPER ARG @options
PARSE UPPER VALUE @options 'TPG()' with 'TPG('opt_tpgid')';
PARSE UPPER VALUE @options 'PREFIX()' with 'PREFIX('opt_prefix')';
PARSE UPPER VALUE @options 'INTERVAL()' with 'INTERVAL('opt_interval')';
/*
* Check option values in the argument.
*/
IF opt_tpgid = '' THEN DO
SAY "Please specify TPG() value in the argument.";
EXIT 8;
END;
IF opt_prefix = '' THEN DO
SAY "Please specify PREFIX() value in the argument.";
EXIT 8;
END;
IF DATATYPE(opt_interval) /= 'NUM' THEN
opt_interval = 600;
/*
* Load TPG configuration file and set information to REXX variables.
*/
CALL KTLOAD "STEM(DEMO_STEM.) MSG(DEMO_MSG.)",
" PREFIX("opt_prefix") TPG("opt_tpgid")";
/*
* Check the return code to see if it is 0 or not.
*/
IF RESULT /= 0 THEN DO
CALL printErrorMessage "KTLOAD" RESULT;
EXIT 8;
END;
User Guide
271