System information
Sharing and maintaining SLES 10 SP2 Linux under z/VM 95
/*+------------------------------------------------------------------+*/
CleanUp: Procedure Expose ro_addrs rw_addrs
/*| Detach all disks before exiting |*/
/*| parm 1: Exit code |*/
/*+------------------------------------------------------------------+*/
Parse Arg retVal
Say
Say 'Cleaning up ...'
'CP DETACH' ro_addrs rw_addrs
/* Write the line S10GOLD2 to the file CURGOLD FILE A */
SAY 'Setting current Gold Disk Variable ...'
file = 'CURGOLD FILE A'
parse value stream(file,'C','OPEN WRITE REPLACE') with ok handle
call CHAROUT file, 'S10GOLD2'
Exit retVal
1.11.9 TST2MNT EXEC
The TST2MNT EXEC copies the read-write disks from S10RWTST to S10RWMNT:
/* Copy Linux from maintenance ID to test ID */
Address 'COMMAND'
source = 'S10RWTST'
target = 'S10RWMNT'
ro_addrs = '01B0 01B1 01B4 01B5 01B6 01B7 01B8'
rw_addrs = '11B0 11B1 11B4 11B5 11B6 11B7 11B8'
Say 'Checking that source and target user IDs are logged off'
Call CheckLoggedOff source
Call CheckLoggedOff target
Say ' '
Say 'Do you want to copy R/W disks from' source 'to' target'? y/n'
Parse Upper Pull answer .
If (answer \= 'Y') Then Exit 1
/* link target disks R/W */
Do a = 1 to Words(rw_addrs)
addr = Word(rw_addrs,a)
'CP LINK' target Right(addr,3) 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