Previous Topic: Called ByNext Topic: Example 2


Examples

Example 1

The ALLOCATE user exit in this example selects an on-site drive for the primary copy of a CA VM:Backup job and an off-site drive for a secondary copy. To implement this user exit, follow these steps:

  1. Add a RESERVE OFF record to the VMBACKUP CONFIG file.
  2. Set up the following site-dependent variables:
    1. CA VM:Backup data set names for on-site drives
    2. CA VM:Backup data set names for off-site drives
    3. List of on-site drives
    4. List of off-site drives
    5. List of default drives for non-CA VM:Backup mount requests
  3. After the lists have been set up, CA VM:Tape checks the data set names for CA VM:Backup jobs and sets the eligible drive list to the appropriate drives without changing standard CA VM:Tape drive ordering.
  4. Program the user exit as shown in the following section:

ALLOCATE User Exit Example 1

/* In this example, drives DA0 and DA1 are on-site*/
/* DA2 and DA3 are offsite, and DA0 will be used*/
/* for all non-VM:Backup requests*/

/*-------------------------Set up site-dependent variables-------------------*/
onsite_drive_dsn = 'WEEKLY.PRIMARY'
offsite_drive_dsn = 'WEEKLY.COPY1'

onsite_drive_list =  'DA0 ACTIVE DA1 ACTIVE DA2 EXEMPT DA3 EXEMPT'
offsite_drive_list = 'DA0 EXEMPT DA1 EXEMPT DA2 ACTIVE DA3 ACTIVE'
default_drive_list = 'DA0 ACTIVE DA1 EXEMPT DA2 EXEMPT' ,
                     'DA3 EXEMPT'

/*---------------------------Check DSN for VM:Backup Jobs-------------------*/
'EXTRACT /MOUNT/'
if (MOUNT.1='RELEASE') then
exit 0              /* RC = 0, Skip VM:Tape drive ordering */
'EXTRACT /COMMAND/'
if (MOUNT.1 = 'MOUNT') then
do
   if (MOUNT.4 = onsite_drive_dsn) then
     'SET EDL NOREORDER' onsite_drive_list
   else if (MOUNT.4 = offsite_drive_dsn) then
     'SET EDL NOREORDER' offsite_drive_list
   else
     'SET EDL NOREORDER' default_drive_list
end
exit 1                       
/* RC = 1, Allow VM:Tape drive ordering */