/* Summary of the procedure is following steps. */
/* 1) Issuing YKQRYDEV to retrieve the volume information. */
/* 2) Depending on result of YKQRYDEV, either USR000I or USR001E */
/* message will be written to MCS console by YKWTOMSG. */
/* If the command is terminated successfully, the script writes */
/* USR000I message with some command device related attributes. */
/* If the command is terminated abnormally, the script writes */
/* USR001E message with return code. */
/* */
/* To run the script, execute "START YKDEMO1S,DEVN=xxxx" from your */
/* MCS console. YKDEMO1S is a sample cataloged procedure of BCM. */
/* "xxxx" is device number of a volume. This value is passed to DEVN */
/* parameter of YKQRYDEV. Specify the value to fit your environment. */
/* */
/**********************************************************************/
/* Beginning of sample script. */
/*
* Parse DEVN operand of YKDEMO1S cataloged procedure.
*/
parse upper arg "DEVN("op_devn")";
/*
* Retrieve a volume information in the storage system. DEVN
* operand is specified a device number of volume for input. STEM
* operand is specified a variable of volume information for output.
*/
address TSO "YKQRYDEV STEM(DEMO.) DEVN("op_devn") MSG(MSG.)";
retcode = rc;
/*
* Check the return code of YKQRYDEV.
*/
if retcode /= 0
then do
/*
* Found errors during YKQRYDEV. Writing USR001E message with
* return code of the command to MCS console. Then, terminate
* the script.
*/
wtorc = YKWTOMSG("E", "USR001E YKQRYDEV error, rc=" || retcode);
exit retcode;
end;
else
nop;
/*
* Retrieve volume information successfully. Writing USR000I message
* with some command device related attributes to MCS console.
*/
wtorc = YKWTOMSG("I", ,
"USR000I YKQRYDEV rc=0", ,
" Device is valid? = " || DEMO.CDEV.INFO, ,
" Device status = " || DEMO.CDEV.STATUS, ,
" CDEV's APID = " || DEMO.CDEV.APID );
/*
* Terminate the sample script successfully.
*/
exit 0;
YKDEMO1S
//YKDEMO1S PROC DEVN=
//*********************************************************************
//*
//* All Rights Reserved. Copyright (C) 2009, 2010, Hitachi, Ltd. //*
Command details 299
Summary of Contents for P9000
Page 302: ...YKDEMO12 302 CLI Commands ...