HP XP Command View Advanced Edition Software User Manual

Page 258

Advertising
background image

/* */

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

/* */

/* KTDEMO10 - A sample demonstration script that */

/* sets tiering policy to volumes in the TPG. */

/* */

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

/* - KTLOAD */

/* - KTACTTPG */

/* */

/* 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 KTDEMO10.";

/*

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

/*

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

/*

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

/*

* Set tiering policy to each volume in the TPG.

*/

CALL KTACTTPG "STEM(DEMO_STEM.) MSG(DEMO_MSG.)";

/*

* Check the return code to see if it is 0 or not.

*/

Sample scripts

258

Advertising