beautypg.com

Ktdemo11 (check the tiering policy) – HP XP Command View Advanced Edition Software User Manual

Page 259

background image

IF RESULT /= 0 THEN DO

CALL printErrorMessage "KTACTTPG" RESULT;

EXIT 8;

END;

SAY "#-- END KTDEMO10."; /* The sample script completed. */

EXIT 0;

/*

* printErrorMessage: This procedure prints all of the error messages

* in the Message structure when a CLI command failed.

*/

printErrorMessage: procedure expose DEMO_MSG.

ARG cli_name cli_result;

SAY "Command name=" || cli_name || ",result=" || cli_result;

IF DATATYPE(DEMO_MSG.0) = 'NUM' THEN

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;

KTDEMO11 (Check the tiering policy)

/* REXX */

/**********************************************************************/

/* */

/* All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd. */

/* */

/**********************************************************************/

/* */

/* KTDEMO11 - A sample demonstration script that */

/* displays tiering policy setting values of volume */

/* in the TPG. */

/* */

/* This sample script uses the following CLI commands. */

/* - KTLOAD */

/* - KTQRYTPG */

/* */

/* 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. */

/* */

/**********************************************************************/

/* Sample script begins. */

SAY "#-- BEGIN KTDEMO11.";

/*

* 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')';

User Guide

259