$! $! Written by Stanley F. Quayle (stan@stanq.com) $! Copyright 2009 Quayle Consulting Inc. $! Last modification: 24-Feb-2011 17:32 $! $! Routine, called by MIGRATE_RECEIVE_V8, to fix FTP'd savesets $! $! Inputs: $! P1 The disk device name $! P2 The disk volume label $! P3 The log file from restore, if one was created $! P4 The full filename of the backup saveset $! P5 The full filename of the SPEC file $! P6 Unused, reserved $! P7 Unused, reserved $! P8 The value of P8 as passed to this procedure $! $ On ERROR then Goto EXIT $! $! The following uses undocumented data structures inside a BACKUP saveset $! to make it readable. $! $! First render the saveset readable, and implicitly $! check that the file exists. $ Set File - /Attributes=(RFM:FIX,MRS:512,LRL=512,ORG=SEQ,RAT=NONE) - 'P4' $! $ Open/Read BckSaveset 'P4' $ Read/End=EOF BckSaveset Record $ Close/Nolog BckSaveset $! $! Find the blocksize from within the record... $ BlockSize = 0 $ BBH_L_BLOCKSIZE = %x28*8 $ BlockSize = F$CVUI (BBH_L_BLOCKSIZE, 32, Record) $ If BlockSize .lt. 2048 .or. BlockSize .gt. 65535 $ Then $ write sys$output f$time() + " Unexpected block size, ''BlockSize'" $ Goto EXIT $ Else $ Set File /Attributes=(RFM:FIX,LRL='BlockSize', - MRS='BlockSize',RAT=none) - 'P4' $ endif $ Goto EXIT $! $ EOF: $ Write sys$output f$time() + " Unexpected end-of-file" $! $ EXIT: $ exit