System information

94 Sharing and maintaining SLES 10 SP2 Linux under z/VM
1.11.8 RO2GOLD2 EXEC
The RO2GOLD2 EXEC is almost identical except that it copies to the 1xxx disks of S10ROGOLD2:
/* Copy Linux from read-only ID to Gold ID */
'pipe cp link s10gold2 21b7 21b7 rr'
'pipe cp 10000 q links 21b7 |',
'split /,/|',
'strip|',
'strip /,/|',
'strip|',
'count lines |',
'var howmany |',
'console|',
'stem names.'
'cp det 21b7'
If (howmany > 1 ) Then Do
Say 'WARNING WARNING WARNING WARNING!'
Say 'You have Linux guests currently reading the S10GOLD'
Say 'disks. Running this script would cause problems!'
Say 'WARNING WARNING WARNING WARNING!'
Exit 1
End
Address 'COMMAND'
Say ' '
Say 'Do you want to copy disks from S10ROGLD to S10GOLD2? y/n'
Parse Upper Pull answer .
If (answer \= 'Y') Then Exit 1
source = 'S10ROGLD'
target = 'S10GOLD2'
ro_addrs = '01B0 01B1 01B4 01B5 01B6 01B7 01B8'
rw_addrs = '21B0 21B1 21B4 21B5 21B6 21B7 21B8'
/* link target disks R/W */
Do a = 1 to Words(rw_addrs)
addr = Word(rw_addrs,a)
'CP LINK' target addr addr 'MR'
If (rc \= 0) Then Call CleanUp 100+a
End
/* link source disks R/O */
Do a = 1 to Words(ro_addrs)
addr = Word(ro_addrs,a)
'CP LINK' source addr addr 'RR'
If (rc \= 0) Then Call CleanUp 200+a
End
/* copy disks */
Do a = 1 to Words(ro_addrs)
source_addr = Word(ro_addrs,a)
target_addr = Word(rw_addrs,a)
'EXEC COPYMDSK' source_addr target_addr
If (rc \= 0) Then Call CleanUp 300+a
End
/* cleanup */
Call CleanUp 0