How about this:

 

/*                                                                     

***********************************************************************

*                                                                     *

*        Mass initialization of new dasd volumes.                     *

*                                                                     *

*        Written by Peter Webb, December 18, 1995.                    *

*                                                                     *

*        Modified to make easier to use. Starting and ending          *

*        addresses can now be entered in hex on the command           *

*        line.                                                        *

*                                                                     *

*        Updated by Peter Webb, August 6, 1998.                       *

*                                                                     *

***********************************************************************

*/                                                                     

address COMMAND                                                        

trace r                                                                

"CP SPOOL CONSOLE START TO *"                                          

parse upper arg starting ending .                                      

/*                                                                     

starting = "7A10"                                                      

ending = "7A1E"                                                        

*/                                                           

starting = x2d(starting)                                     

quantity = x2d(ending) - (starting - 1)                      

do i = starting for quantity                                 

   voladdr = d2x(i)                                          

   "CP ATTACH" voladdr "* 100"                               

   if rc ¬= 0 then do                                        

      say "Could not attach" voladdr "return code" rc        

      iterate                                                

   end                                                       

   "ERASE INITDISK DSF A"                                    

   "EXECIO 1 DISKW INITDISK DSF A 0 F 80 (FINIS STRING",     

      " INIT UNIT(100) NVFY VOLID(NU"right(voladdr,4,"0")")",

         "NOMAP VAL NCHK NOINDEX"                            

   "ICKDSF INITDISK DSF A" voladdr "OUTPUT2 A"               

   if rc ¬= 0 then do                                        

      say "Could not initialize" voladdr "return code" rc    

   end                                                       

   "FINIS * * *"                                             

   "CP DETACH 100"                                           

end                                                          

parse value diag("08","QUERY USER *") with . 12 terminal 15 .

if terminal = "DSC" then queue "CP LOGOFF"

exit                                      

 

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Paul 
Raulerson
Sent: July 3, 2007 00:00
To: [email protected]
Subject: CPFMTXA: Automation of?

 

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

 



The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material.  Any 
review retransmission dissemination or other use of or taking of any action in 
reliance upon this information by persons or entities other than the intended 
recipient or delegate is strictly prohibited.  If you received this in error 
please contact the sender and delete the material from any computer.  The 
integrity and security of this message cannot by guaranteed on the Internet.  
The Sender accepts no liability for the content of this e-mail or for the 
consequences of any actions taken on basis of the information provided.  The 
recipient should check this e-mail and any attachments for the presence of 
viruses.  The sender accepts no liability for any damage caused by any virus 
transmitted by this e-mail.  This disclaimer is the property of the TTC and 
must not be altered or circumvented in any manner.

Reply via email to