HP XP Command View Advanced Edition Software User Manual

Page 252

Advertising
background image

/* displays information in the TPG configuration dataset. */

/* */

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

/* - KTLOAD */

/* */

/* This sample script assumes the following settings. */

/* 1) TPG configuration dataset is already created. */

/* 2) TPG configuration dataset is allocated to ddname KTTPGDD. */

/* */

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

/* Sample script begins. */

SAY "#-- BEGIN KTDEMO03.";

/*

* Get dataset name of ddname KTTPGDD.

*/

fc = LISTDSI("KTTPGDD" "FILE");

IF fc > 4 THEN DO;

SAY 'DD(KTTPGDD) is not allocated or invalid.';

EXIT 8;

END;

/*

* Get prefix and serialNum from dataset name.

*/

PARSE VAR sysdsname val_prefix'.TPG.'val_tpgid;

/*

* Load TPG configuration file and set information to REXX variables.

*/

CALL KTLOAD "STEM(DEMO_STEM.) MSG(DEMO_MSG.)",

" PREFIX("val_prefix") TPG("val_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;

/*

* Display values in the TPG configuration file.

*/

SAY 'Tiering Policy Group Name: '||DEMO_STEM.TPG.ID;

SAY '';

SAY 'Volumes';

SAY ' Devn,Volser,STORGRP ,SN ,CU,SSID,CCA,POOLID,'||,

'TLv, Entry,Reloc, Cylinders'

DO i=1 to DEMO_STEM.TPG.VOL.0;

/*

* Get information values about the volume

* from TPG structure REXX variables.

*/

val_SN = DEMO_STEM.TPG.VOL.i.SerialNum;

val_CU = DEMO_STEM.TPG.VOL.i.CUNum;

val_CCA = DEMO_STEM.TPG.VOL.i.CCA;

val_TierLevel = DEMO_STEM.TPG.VOL.i.TierLevel;

val_Entry = DEMO_STEM.TPG.VOL.i.Entry;

val_TierRelocation= DEMO_STEM.TPG.VOL.i.TierRelocation;

Sample scripts

252

Advertising