Use TSM scripts.  Here's one basic example to get you started, you'll
probably find many other examples in the archives.

/* Cleanup the scripts created from the previous runs */
delete script MOVE_DBS_OFFSITE
delete script UPDATE_DBS_REMOVED
/* Create the macro file for the checkout of DB tapes */
q drmedia * begindate=today-1 copystgpool=none source=dbbackup format=cmd
append=no cmdfile=/tsm/scripts/dbs-off.mac cmd="checkout libvol 3583lib
&VOL remove=bulk checklabel=no"
/* Define the script that will checkout the DB tapes */
if (rc_ok) define script MOVE_DBS_OFFSITE file=/tsm/scripts/dbs-off.mac
desc='**  Auto created by script  **'
/* Create the macro file to update the DB tapes to offsite */
if (rc_ok) q drmedia * begindate=today-1 copystgpool=none source=dbbackup
format=cmd append=no cmdfile=/tsm/scripts/dbs-rmvd.mac cmd="update volhist
&VOL devclass=LTO location='OFFSITE'"
/* Define the script that will update the DB tapes to offsite */
if (rc_ok) define script UPDATE_DBS_REMOVED file=/tsm/scripts/dbs-rmvd.mac
desc='**  Auto created by script  **'
/* Checkout the DB tapes */
run MOVE_DBS_OFFSITE

/* Update the DB volumes to offsite */
run UPDATE_DBS_REMOVED


===================================================
      John Monahan

      Senior Consultant Enterprise Solutions
      Computech Resources, Inc.
      Office: 952-833-0930 ext 109
      Cell: 952-484-5435
      http://www.compures.com
===================================================




                    Burak Demircan
                    <burak.demircan@DAIMLERCHR       To:     [EMAIL PROTECTED]
                    YSLER.COM>                       cc:
                    Sent by: "ADSM: Dist Stor        Subject:     checkout without DRM
                    Manager"
                    <[EMAIL PROTECTED]>


                    05/09/2002 12:04 AM
                    Please respond to "ADSM:
                    Dist Stor Manager"






Hi,
I do not use DRM and I want to checkout DB volumes for the last 2 days. I
have
written
the "select" statement to choose the volumes but I can not join the
following 2
commands?
Any help will be appreciated.

1) select volume_name from volhistory where (type='BACKUPFULL') and
(cast((CURRENT_TIMESTAMP-date_time)days as decimal(18,0))<=2)

2) checkout libvolume 3583lib XXXXX remove=bulk checklabel=no

Regards,
Burak

Reply via email to