beautypg.com

HP XP Command View Advanced Edition Software User Manual

Page 263

background image

SAY ' POOL';

SAY ' Devn,Volser,SN ,CU,CCA, ID,TLv,Cylinders,'||,

'Tier1Page,Tier2Page,Tier3Page';

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;

/*

* Get information values about the volume

* from DSK structure REXX variables.

*/

val_Devn = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Devn;

val_Volser = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Volser;

val_Cyls = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Cyls;

val_POOLID = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.POOLID;

val_TierLevel = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.TierLevel;

/* Display only multi tier volume. */

val_TierCt = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Tier.0;

IF DATATYPE(val_TierCt) /= 'NUM' THEN

ITERATE;

DO t=1 to val_TierCt;

val_pageCt.t = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Tier.t.Used;

END;

DO t=val_TierCt+1 to 3;

val_pageCt.t = 0;

END;

/*

* Display volume's tier information in the TPG.

*/

SAY ' 'RIGHT(val_Devn,4)','LEFT(val_Volser,6)||,

','val_SN','val_CU', 'val_CCA','RIGHT(val_POOLID,3)||,

','RIGHT(val_TierLevel,3)||,

','RIGHT( val_Cyls,10)||,

','RIGHT(val_pageCt.1,10)||,

','RIGHT(val_pageCt.2,10)||,

','RIGHT(val_pageCt.3,10);

END;

SAY "#-- END KTDEMO12."; /* 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

User Guide

263