Appendix B. z/VM source code 217
say ''
say ' Format one or a range of DASD as page, perm, spool or temp disk space'
say ' The label written to each DASD is V<t><xxxx> where:'
say ' <t> is type - P (page), M (perm), S (spool) or T (Temp disk)'
say ' <xxxx> is the 4 digit address'
say ''
say 'Syntax is:'
say " .-PAGE-."
say " >>--CPFORMAT--.-rdev--------------.--AS---+-PERM-+---------><"
say " | <---------------< | '-SPOL-'"
say " '-rdev1-rdev2-------' "
say ''
exit 1
/*+------------------------------------------------------------------+*/
areYouSure: procedure
/*| Show minidisks, ask are you sure |*/
/*| parm 1: type - PERM, PAGE, or SPOL |*/
/*| retVal: firstChar - LPAR identifier, 'V' by default |*/
/*+------------------------------------------------------------------+*/
arg type
say ''
say 'WARNING - this will destroy data!'
say 'ARE YOU SURE you want to format the DASD as' type 'space (y/n)?'
parse upper pull answer
return substr(answer, 1, 1) /* from areYouSure */
/*+------------------------------------------------------------------+*/
getLabelPrefix: procedure
/*| Return first two chararcters of label |*/
/*| parm 1: firstChar - LPAR identifier, 'V' by default |*/
/*| retVal: the two character label prefix |*/
/*+------------------------------------------------------------------+*/
arg firstChar type
select
when (type = PERM) then
labelPrefix = firstChar||'M' /* for VM Minidisk */
when (type = PAGE) then
labelPrefix = firstChar||'P' /* for VM Page */
when (type = SPOL) then
labelPrefix = firstChar||'S' /* for VM Spool */
otherwise
do
say 'Error: "AS" must be present, type must be PERM, PAGE or SPOL'
call help
end /* otherwise */
end /* select */
return labelPrefix /* from getLabelPrefix */
/*+------------------------------------------------------------------+*/
parseDasd: procedure expose dasdList.
/*| parse all dasd into an array verifying all are attached |*/
/*| parm 1: dasds - the list of dasd passed in |*/
/*| retVal: number of DASD in dasdList |*/
/*+------------------------------------------------------------------+*/
arg dasds
numDasd = 0
say ''
say 'Format the following DASD:'
do while (dasds <> '')
Comentarios a estos manuales