A while back I had to reformat just cylinder 0 of a whole slew of VM
volumes that had been originally formatted by a z/OS utility. I used the
following short EXEC plus an input file:
/* */
'PIPE CMS ERASE FMT-CYL0 CPFMTXA A | HOLE'
/* 6400 ICK33001I VM6400 CYLINDER ZERO NOT IN CP FORMAT */
'PIPE',
'< Q-ALLOC NOT-CP A',
'| SPECS W1 1 W3 NW',
'| STEM DASD.'
DO i=1 TO dasd.0
parse var dasd.i raddr volid .
CALL fmt_cyl_0 raddr volid
END
EXIT
CALL fmt_cyl_0 674d VM674d
CALL fmt_cyl_0 662b VM322b
/* ----------------------------- */
fmt_cyl_0: PROCEDURE
arg raddr volid .
'PIPE CP DEFINE MDISK' raddr '0 END' volid '| HOLE'
say 'CPFMTXA' raddr volid 'FORMAT'
MAKEBUF
push 'END'
push 'YES'
'PIPE (ENDCHAR ?)',
'CMS CPFMTXA' raddr volid '0.1',
'| >> FMT-CYL0 CPFMTXA A'
DROPBUF
'PIPE CP DET' raddr '| HOLE'
RETURN
The input file contained the ICK33001I message lines extracted from the
output of another EXEC which used CPFMTXA to query the allocation map of
all the volumes. There's a sample in a comment line in the above EXEC.
There are also some sample calls to the subroutine that does the work.
The output is captured in a file for later review.
To format other than just cylinder 0 you'd need to adjust the CPFMTXA cal
l
in the subroutine. Consult the CPFMTXA utility in the "CP Commands and
Utilities" manual for the parameter details.
Brian Nielsen
On Mon, 2 Jul 2007 23:00:08 -0500, Paul Raulerson <[EMAIL PROTECTED]>
wrote:
>Does anyone have an example script they would be willing to share that
shows
>how to automate CPFMTXA? I have a few hundred DASD volumes to format and
I
>would REALLY like to just write a script and have it go. I am, of course
,
>stuck in figuring out how to say 'YES' to the program when it wants it.
>
>
>
>Thanks
>
>-Paul