Hilary,
Here is what I use, for what it's worth. It get's the job done. I put in some
/*%%%%%%%%%%%%% ...' where you would make changes for your shop. It's not
perfect, in fact I have some more work to do to make it 'pretty' and more
error-catching. Unfortuately I don't have the restore exec. Hmmm, guess I
better get busy with one. :-)
Hope it helps,
Michael
DDR Parm file example:
SYSPRINT CONS
INPUT 0200 3390 530RES
OUTPUT 181 3590 (LEAVE
DUMP ALL
INPUT 0201 3390 530W01
OUTPUT 181 3590 (LEAVE
DUMP ALL
INPUT 0202 3390 530PAG
OUTPUT 181 3590 (LEAVE
DUMP ALL
INPUT 0203 3390 530SPL
OUTPUT 181 3590 (LEAVE
DUMP ALL
INPUT 0204 3390 VMSYS2
OUTPUT 181 3590 (LEAVE
DUMP ALL
Exec:
/***** This exec is used to backup non-VSE systems, namely:
The VM system it's self, using DDR
ID SUSE9, Linux Suse V9
ID SLES10, Linux Suse V10
IDs Lin01-Lin04
*****/
Trace o
ADDRESS COMMAND 'CP SP CONS START *'
Call Misc_Settings
Call Check_Tape_Unit
Call Check_Volumes
Call Relink_mdisks
Call Check_Tape_Unit
Call Check_Tape_Media
Call Build_DDR_Parm_File
Call Backup_using_DDR
'pipe cp q tapes | locate /BACKDASD/ | spec w2 1 | var the_tape'
If the_tape='THE_TAPE' then do
say '+----------------------------------------------------+'
say '+ It appears as though the tape you used has already'
say '+ been detached. '
say '+ You will need to attach the tape drive you used to'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+ PROD. If the tape unit is 5A2, following is what you '
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+ would key:'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+ att 5A2 PROD'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+----------------------------------------------------+'
End
address command 'CP DETACH 181'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
address command 'CP ATT 'the_tape' PROD'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+----------------------------------------------------+'
say '+ The backup is now complete.'
say '+ The backup is now complete.'
say '+ The backup is now complete.'
say '+ The backup is now complete.'
say '+ The backup is now complete.'
say ' '
say '+ Please mark the date and the '1 of 5', '2 of 5', etc.'
say '+ designation as appropriate.'
say '+----------------------------------------------------+'
ADDRESS COMMAND 'SP CONS CLOSE *'
Exit
/***********************************************/
Misc_Settings:
/***********************************************/
f_type=date(S) /***** date(S)=yyyymmdd *****/
/***** Fmt is: volser virt_addr volser virt_addr ... *****/
/***** let the terminal proceed with little operator intervention *****/
address command 'CP TERM MORE 3 3'
address command 'CP TERM HOLD OFF'
/***** Tables of dasd and dasd addrs are below *****/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
VM_test_dasd= ' '
SLES10_dasd= 'HMA903 0400 '
LIN01_dasd= 'HMA902 0401 '
LIN02_dasd= 'HMA901 0402 '
LIN03_dasd= 'HMA904 0403 LIN000 0405 LIN001 0406'
LIN04_dasd= 'HMA909 0404 LIN003 0407 LIN004 0408 LIN005 0409'
VM_DASD = '530RES 0200 530W01 0201 530PAG 0202 530SPL 0203 VMSYS2 0204
VMSYS1 0205'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
All_together= VM_dasd ,
SLES10_dasd ,
LIN01_dasd LIN02_dasd LIN03_dasd LIN04_dasd ,
VM_test_dasd
VM_test_dasd
/***** If disks are not attached to system, attach them then re-link them *****/
'pipe literal Detail on non-VSE disk backups | > DETAIL 'f_type' a'
Return
/***********************************************/
Check_Volumes:
/***********************************************/
Do a=1 by 2 to words(All_together) /*****#####do
one#####*****/
vol_ser=subword(All_together,a,1)
say '+----------------------------------------------------+'
say '+ Pre-checking volume 'vol_ser'...'
say '+----------------------------------------------------+'
'pipe cp q dasd 'vol_ser' ' , /***** get real addr *****/
'| var out_put1'
real_addr=subword(out_put1,2,1)
'pipe cp q dasd details 'real_addr , /***** record details of vols *****/
'| >> DETAIL 'f_type' a'
If subword(out_put1,3,2)='CP SYSTEM' then iterate a
If subword(out_put1,3,2)='CP OWNED' then iterate a
If subword(out_put1,3,2)='ATTACHED TO' then do /*****#####do
two#####*****/
who_has_it=subword(out_put1,5,1)
'cp det 'real_addr who_has_it ; ret_code=rc
If ret_code=0 then nop
else call Error_exit exec_cmd="'cp detach "real_addr who_has_it"'"
'cp att 'real_addr' system 'vol_ser
If ret_code=0 then nop
else call Error_exit exec_cmd="'cp attach "real_addr" system "vol_ser"'"
End /*****#####end do two#####*****/
'cp att 'real_addr' system 'vol_ser /***** since all spec excp was
skipped, att to sys *****/
End /*****#####end do one#####*****/
Return
/***********************************************/
Relink_Mdisks:
/***********************************************/
Do a=2 by 2 to words(All_together) /*****#####do
one#####*****/
virt_addr=subword(All_together,a,1)
b=a-1
say '+----------------------------------------------------+'
say '+ Re-linking virtual address 'virt_addr' for volser
'subword(All_together,b,1)'...'
say '+----------------------------------------------------+'
'cp link * 'virt_addr virt_addr 'rr' ; ret_code=rc
If ret_code=0 then nop
else call Error_exit exec_cmd="'cp link "virt_addr virt_addr" rr'"
End /*****#####end do one#####*****/
Return
/***********************************************/
Check_Tape_Unit:
/***********************************************/
say '+----------------------------------------------------+'
say '| Do you have a tape drive attached as 181? Review '
say '| output below and answer y(es) or press enter. '
say '| (The 2nd field is the virtual address and needs to '
say '| be 181. i.e. attach 5a2 backdasd 181 ) '
say '+----------------------------------------------------+'
'CP Q V TAPES'
pull ans_wer .
upper ans_wer
If (ans_wer='Y' | ans_wer='') then return
/***** the code below needs work
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
If ans_wer='N' then do until ( tape_addr='5A0' | tape_addr='5A1' |
tape_addr='5A2' )
say '+----------------------------------------------------+'
say '| Please specify the real address of the 3590 drive '
say '| you CAN use (5A0, 5A1 or 5A2).'
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
say '+----------------------------------------------------+'
pull tape_addr .
End
'pipe cp q 'tape_addr'| var out_put2' ; upper out_put2
If subword(out_put2,3,2)='ATTACHED TO' then do
'cp det 'tape_addr subword(out_put2,5,1) ; ret_code=rc
If ret_code=0 then nop
else call Error_exit exec_cmd="'cp detach "tape_addr" * 181'"
End
'pipe cp q 'tape_addr'| var out_put2' ; upper out_put2
If subword(out_put2,3,1)='FREE' then do
'cp att 'tape_addr' * 181' ; ret_code=rc
If ret_code¬=0 then call Error_exit exec_cmd="'cp attach "tape_addr" * 181'"
End
********************/
Return
/***********************************************/
Check_Tape_Media:
/***********************************************/
say '+----------------------------------------------------+'
say '| Mount the 1st 3590 scratch tape on your dedicated '
say '| drive. When complete, press enter '
say '+----------------------------------------------------+'
'tape rew'
/****************************************************
'pipe tape 181 | take 1 | var vol_rec'
If substr(vol_rec,1,4)¬='VOL1' then do
say '+----------------------------------------------------+'
say '| The tape media mounted on the drive does not have '
say "| a standard header 'vol1' record. Please re-init "
say '| the media using the "tape wvol1" command and try '
say '| this exec again. '
say '| Exiting...'
say '+----------------------------------------------------+'
Exit
End
If substr(vol_rec,5,3)¬='900' then Do
say '+----------------------------------------------------+'
say '| The tape media mounted on the drive is not one of '
say "| the 900 series tapes. Please dismount and mount a "
say '| 900 series tape and restart this exec. '
say '| Exiting...'
say '+----------------------------------------------------+'
Exit
End
****************************************************/
Return
/***********************************************/
Backup_using_DDR:
/***********************************************/
'cp sp cons start *'
'tape rew' ; 'tape fsf 1'
'ddr budasd parm1 a'
Return
/***********************************************/
Build_DDR_Parm_File:
/***********************************************/
c=1 ; card.1='SYSPRINT CONS'
'pipe literal 'All_together' ', /***** fmt the records into volser
virt_addr *****/
'| tokenize / / ',
'| join 1 / /',
'| stem input_recs.'
Do a=1 to input_recs.0 /*****#####do one#####*****/
vol_ser=subword(input_recs.a,1,1) ; virt_addr=subword(input_recs.a,2,1)
c=c+1
card.c='INPUT 'virt_addr' 3390 'vol_ser
c=c+1
card.c='OUTPUT 181 3590 (LEAVE'
c=c+1
card.c='DUMP ALL'
End
card.0=c
'pipe stem card. | > budasd parm1 a'
Return
Error_exit:
say '+----------------------------------------------------+'
say '| An error has occurred while executing, '
say '| '
say '| 'exec-cmd'.'
say '| '
say '| Now exiting so you can fix it. Re-execute when the'
say '| error has been corrected.'
say '+----------------------------------------------------+'
Exit
Return
----- Original Message ----
From: Hilary Hurwitz <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, March 6, 2008 3:42:41 AM
Subject: Procedure to ddr multiple disks to one tape and restore
I am not really a VM
person, so I am asking for help a bit .
Does anyone have a
Rexx proc that will take a list of disks as input and back them up to one
tape . We just became the proud owners of 3590 drives. Before it was at least
two tapes per disk. (yes we took a few boxes of tapes to do DRP testing)
IIdeally I would like to produce
a rexx proc for restoring those disks too . ( I can wish cant
I?)
Otherwise I will be
reinventing the wheel.
Many
thanks
Hilary Hurwitz
הילרי הורביץ System Programmer עובדת סיסטם
Phone: + 972 2 6297034
02-6297034 טלפון: Fax: + 972 2
6295247 02-6295247 פקס: Mobile:
+ 972 50 7605551 050-7605551 סלולרי: Email:
[EMAIL PROTECTED] [EMAIL PROTECTED] דוא''ל:
www.malam.com
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs