HP XP Command View Advanced Edition Software User Manual

Page 245

Advertising
background image

/* DEVN 0000 00FF */

/* VOLSER VOL001 VOL009 */

/* STORGRP GRPNAME */

/* 2) The definition files are stored in the dataset with the */

/* prefix specified in PREFIX() option value */

/* in the script's argument. */

/* */

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

/* Sample script begins. */

SAY "#-- BEGIN KTDEMO00.";

/*

* Parse argument specified in the EXEC command

*/

PARSE UPPER ARG @options

PARSE UPPER VALUE @options 'PREFIX()' with 'PREFIX('opt_prefix')';

/* Check option values. */

IF opt_prefix = '' THEN DO

SAY "Please specify PREFIX() value in the argument.";

EXIT 8;

END;

/*

* Read all records from DD(KTINDD) dataset.

*/

ADDRESS TSO "EXECIO * DISKR KTINDD (FINIS STEM scan_range.";

IF RC /= 0 THEN DO

SAY 'Dataset(KTINDD) read error occurred. rc='RC;

EXIT 8;

END;

/*

* Parse each record of DD(KTINDD) dataset.

*/

ScannedVolumeIsFound='N';

ScanFailed='N';

DO i=1 to scan_range.0;

/*

* Parse scan range list record.

*/

recordStr = SUBSTR(scan_range.i,1,72);

PARSE VAR recordStr scan_type scan_from scan_to .

/*

* Scan volumes by DEVN or VOLSER or STORGRP range,

* and add volume information

* to REXX variables of the STEM() operand specified.

*/

IF scan_type='DEVN' THEN DO

SAY 'Executing KTSCAN DEVN= 'scan_from' - 'scan_to;

CALL KTSCAN "STEM(DEMO_STEM.) MSG(DEMO_MSG.) ARRAYS(DEMO_SCAN.)",

" FROM("scan_from") TO("scan_to")";

END;

ELSE IF scan_type='VOLSER' THEN DO

SAY 'Executing KTSCAN VOLSER= 'scan_from' - 'scan_to;

CALL KTSCAN "STEM(DEMO_STEM.) MSG(DEMO_MSG.) ARRAYS(DEMO_SCAN.)",

" FROMVSN("scan_from") TOVSN("scan_to")";

END;

ELSE IF scan_type='STORGRP' THEN DO

User Guide

245

Advertising