HP XP Command View Advanced Edition Software User Manual

Page 260

Advertising
background image

/*

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

/*

* Get tiering policy setting values of volume in the TPG and

* tier status of volumes and pools in the TPG to REXX variables.

*/

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

/*

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

*/

IF RESULT /= 0 THEN DO

CALL printErrorMessage "KTQRYTPG" 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'

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

/*

* Generate symbol which is part of the DSK structure REXX variable

* name.

*/

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

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

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

sym_SN = 'SN' ||val_SN;

sym_CU = 'CU' ||val_CU;

sym_CCA = 'CCA'||val_CCA;

/*

Sample scripts

260

Advertising