HP XP Command View Advanced Edition Software User Manual
Page 247
KTDEMO01 (Display the contents of the disk configuration definition file)
/* REXX */
/**********************************************************************/
/* */
/* All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd. */
/* */
/**********************************************************************/
/* */
/* KTDEMO01 - A sample demonstration script that */
/* displays information in the DSK configuration dataset. */
/* */
/* This sample script uses the following CLI commands. */
/* - KTGETHDA */
/* */
/* This sample script assumes the following settings. */
/* 1) DSK configuration dataset is already created. */
/* 2) DSK configuration dataset is allocated to ddname KTDSKDD. */
/* */
/**********************************************************************/
/* Sample script begins. */
SAY "#-- BEGIN KTDEMO01.";
/*
* Get dataset name of ddname KTDSKDD.
*/
fc = LISTDSI("KTDSKDD" "FILE");
IF fc > 4 THEN DO
SAY 'DD(KTDSKDD) is not allocated or invalid.';
EXIT 8;
END;
/*
* Get prefix and serialNum from dataset name.
*/
PARSE VAR sysdsname val_prefix'.DSK.SN'val_SN'.'val_dadid;
/*
* Read DSK configuration file and set pool/volume information
* to REXX variables.
*/
CALL KTGETHDA "STEM(DEMO_STEM.) MSG(DEMO_MSG.)",
" PREFIX("val_prefix") SN("val_SN")";
/*
* Check the return code to see if it is 0 or not.
*/
IF RESULT /= 0 THEN DO
CALL printErrorMessage "KTGETHDA" RESULT;
EXIT 8;
END;
/*
* Display values in the DSK configuration file.
*/
DO k=1 to HCC.HDAKT.0;
val_SN = HCC.HDAKT.k.SerialNum;
sym_SN = 'SN'||val_SN;
User Guide
247