An heavily stripped-down version of our VM:Tape "Command Exit" is pasted 
below.  We do quite a bit more in our full exit  (e.g permitting 
operations to redirect VM:Backup recall requests to different campuses on 
different drives at will, handling Disaster Recovery recall mounts 
automatically, etc.), but this stripped down example should get you 
started. 

You should probably adjust a few of the variables at the top (VMBonly=, 
VMBsvms=, VMAsvms=) to meet your specific needs.  I find that real-world 
examples help a bit more than most doc, often considering situations that 
might not be obvious from the doc.

Mike Walter
Hewitt Associates
Any opinions expressed herein are mine alone and do not necessarily 
represent the opinions or policies of Hewitt Associates.

* Prolog; See Epilog for additional information ********************
 * Exec Name     - $COMMAND EXEC (VMTAPE Command Exit)              *
 * Supported By  -                                                  *
 * Status        - Version 1, Release 2.0                           *
 ********************************************************************/
/* Address COMMAND */  /* <--- Not a good idea in this Exit <-------*/

   parse source xos xct xfn xft xfm xcmd xenvir .
   parse upper arg parms 0 operands '(' options ')' parmrest
   /* Variables beginning with '?' are typically binary flags ON|OFF*/
   self=userid()

  'EXTRACT /COMMAND/USERID/'

   VMBonly='VMBACKUP V2BACKUP'
   VMBsvms='VMBACKUP VMBARCH  VMBMPC' ,
           'V2BACKUP V2BARCH  V2BMPC'
   VMAsvms='VMARCH   V2ARCH   V3ARCH' ,
           'VMMDARCH V2MDARCH V3MDARCH'

   /* Note: there will be one cmd per active VM:Oper TAPEMGR user   */
   /*       (it can look like a bug, but it's just them synching up)*/

   /* say 'Cmd from' user.1':' command.1 */

   /* ------------------------------------------------------------- */
   /* Look for command:                                             */
   /*       MOUNT volser1 vdev  (WRITE RETPD nnn ANYTAPE            */
   /* or (for restores, perhaps such as D.R.)                       */
   /*       MOUNT (volsr1 volsr2 ) vdev (READ LABEL SL ANYTAPE      */
   /* or    MOUNT (volsr1 ) vdev (READ LABEL SL ANYTAPE             */
   /*                                                               */
   /* E.g.  MOUNT (318321 701007 ) 310 (READ LABEL SL ANYTAPE       */
   /* ------------------------------------------------------------- */

   parse var user.1 l6user1 7 .
   ?multvols=0
   If pos(')',command.1)>0 then
      Do
        parse var command.1 cmd '(' vols ')' vdev '('mntopts ')' ,
                          1 . w2 .
        cmd=strip(cmd,'B')
        If words(vols)>1 then         /* Might be handy to know    */
           ?multvols=1
      End
   Else
      Do
        parse var command.1 cmd vols postvols '('mntopts
        cmd=strip(cmd,'B')
      End

   /* Exit quickly if not a VM:Backup server recall mount */
   If \abbrev('MOUNT',cmd,1) then Call Exit 0
   If \?multvols then Call Exit 0

   ?read=wordpos('READ',mntopts)>0   /* R/O mount?                  */
   If \?read then Call Exit 0        /* No, pass on cmd unchanged*/

   /* Exit quickly if not a VM:Backup server */
   If wordpos(user.1,'VMBACKUP VMBARCH VMBMPC V2BACKUP')=0 & ,
      l6user1<>'VMBRES'  then        /* Any VMBRESnn server         */
      Call Exit 0                    /* Exit if not VM:Backup svm.  */

   /* ------------------------------------------------------------- */
   /* At this point the MOUNT cmd is from VMBACKUP|VMBARCH|VMBRESnn,*/
   /* is READ only, and had a parenthesis around the volser(s).     */
   /* ------------------------------------------------------------- */

   say 'Input:' command.1
   parse var vols vol1 vol2 .

   /* ------------------------------------------------------------- */
   /* At this point the MOUNT cmd is from VMBACKUP|VMBARCH|VMBRESnn,*/
   /* is READ only, and had a parenthesis around the volser(s).     */
   /* ------------------------------------------------------------- */

   /* ------------------------------------------------------------- */
   /* If mounter is a VMBACKUP machine, the mount is a READ (recall)*/
   /* swap the volsers per local requirements.                      */
   /* ------------------------------------------------------------- */

   newcmd=cmd '('vol2 vol1')' vdev '('mntopts
  'SET COMMAND' newcmd
   Call Exit 0


Call Exit 0

/****************************************************************** */
/*                   Sub-Routines below this point                  */
/****************************************************************** */

Exit:
   parse arg exitrc .
   If verify(exitrc,0123456789)=0 then Exit exitrc


/* Epilog ***********************************************************
 * Function      -                                                  *
 * Component of  -                                                  *
 * Command format-                                                  *
 * Called by     -                                                  *
 * Dependencies  - VM/SP 3 or higher.                               *
 *               - e.g. LISTFILE, COPYFILE, etc.                    *
 * Program Lang. - CMS REXX                                         *
 * Return Codes  - 0, Successful completion                         *
 *                 4, Help requested or no operands entered.        *
 *                 8, Command operands not entered properly, failed.*
 *                12, Unexpected condition found, failed.           *
 *                20, Internal logic error in command, failed.      *
 * Date Written  - yyyymmdd                                         *
 * Author        - First M. Last                                    *
 * Changed | By  | Description of Change                            *
 * --------+-----+------------------------------------------------- *
 * yyyymmdd  iii -                                                  *
 *                                                                  *
 ********************************************************************/





"Imler, Steven J" <[email protected]> 

Sent by: "The IBM z/VM Operating System" <[email protected]>
06/16/2009 09:50 AM
Please respond to
"The IBM z/VM Operating System" <[email protected]>



To
[email protected]
cc

Subject
Re: VMBackup question






You VM:Backup System Programmer is correct ... the "higher" density
media will always be preferenced in the volser list sent to VM:Tape. 

The simplest thing I can think to do is use a VM:Tape COMMAND EXIT that
swaps the 2 volsers in the list. 

Alternatively, I suppose you could "outcode" (CHECKOUT) the 3590 tapes,
I think that would prevent them from being selected (but you'd need to
remember to check them back in before they can be scratched for reuse). 

JR (Steven) Imler
CA 
Senior Sustaining Engineer
Tel: +1-703-708-3479
[email protected]



-----Original Message-----
From: The IBM z/VM Operating System [mailto:[email protected]] On
Behalf Of Jim Bohnsack
Sent: Tuesday, June 16, 2009 10:34 AM
To: [email protected]
Subject: VMBackup question

We have installed a Luminex virtual tape system.  My question isn't how 
to make it work.  It seems to be doing fine.  The only problem and the 
reason for my question is that I have the virtual tapes defined as 3490C

tapes.  My quandary is the fact that I have the virtual tapes defined as

the VMBackup Primary Resource Pool and and a 3494 robot with 3590 
drives, located in a different location, as the VMBackup Copy Resource 
Pool.  It works just fine for backups. 

Restores, however, result in VMBackup picking a 3590 tape rather than 
one of the 3490 tapes.  I know, or think I know, that I can get around 
that using VMBackup Job Template files and specifying the input tape 
volser and/or density.  That's a little awkward.  I want the restores to

be able to be done from the VMBackup screens so our admin. people can do

them.  The VMBackup System Prog. Ref says that the tapes for a restore 
are chosen from a density preference list with the higher density tapes,

naturally, being chosen first.  That's logical, but not what I want. 

Does anyone have any idea as to how to force VMBackup to use a different

list?  I have a question open the CA but I was hoping that someone has 
faced the same question .

Jim

-- 
Jim Bohnsack
Cornell University
(972) 596-6377 home/office
(972) 342-5823 cell
[email protected]






The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited. All messages 
sent to and from this e-mail address may be monitored as permitted by 
applicable law and regulations to ensure compliance with our internal policies 
and to protect our business. E-mails are not secure and cannot be guaranteed to 
be error free as they can be intercepted, amended, lost or destroyed, or 
contain viruses. You are deemed to have accepted these risks if you communicate 
with us by e-mail. 

Reply via email to