beautypg.com

Ktdemo04 (display the volume information) – HP XP Command View Advanced Edition Software User Manual

Page 253

background image

/*

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

* name.

*/

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

/*

* Display volume information in the TPG.

*/

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

','LEFT(val_STORGRP,8)','val_SN','val_CU||,

','val_SSID', 'val_CCA','RIGHT(val_POOLID,6)||,

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

','RIGHT(val_TierRelocation,5)||,

','RIGHT(val_Cyls,10);

END;

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

KTDEMO04 (Display the volume information)

/* REXX */

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

/* */

/* All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd. */

/* */

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

/* */

/* KTDEMO04 - A sample demonstration script that */

User Guide

253