HP XP Command View Advanced Edition Software User Manual
Page 249
hex_CU = D2X(pos_CU-1, 2);
sym_CU = 'CU'||hex_CU;
/* Find first CCA from CCAMap. */
val_CCAMap = VALUE("HCC.HDAKT."||k||"."||sym_CU||".CCAMAP");
pos_CCA = POS('1',val_CCAMap, 1); /* Find mapped CCA. */
DO WHILE(pos_CCA /= 0);
hex_CCA = D2X(pos_CCA-1, 2);
sym_CCA = 'CCA'||hex_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_STORGRP = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.STORGRP;
val_SSID = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.SSID;
val_POOLID = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.POOLID;
val_Cyls = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.Cyls;
val_External = DEMO_STEM.LOCAL.sym_SN.sym_CU.sym_CCA.External;
/* Display volume information. */
SAY ' 'RIGHT(val_devn,4)','LEFT(val_Volser,6)||,
','LEFT(val_STORGRP,8)||,
','hex_CU','val_SSID', 'hex_CCA','RIGHT(val_POOLID,6)||,
','RIGHT(val_Cyls,10)','RIGHT(val_External,3);
/* Find next CCA from CCAMap. */
pos_CCA = POS('1',val_CCAMap, pos_CCA+1);
END;
/* Find next CU from CUMap. */
pos_CU = POS('1',val_CUMap, pos_CU+1);
END;
END;
SAY "#-- END KTDEMO01."; /* 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;
/*
* convertMediaType: This procedure converts from media type value
* (
* to media type description string.
*/
convertMediaType: procedure
User Guide
249