[Info-vax] fixing a saveset's attributes: attachment, not ftp
Michael Moroney
moroney at world.std.spaamtrap.com
Mon Jun 22 10:59:42 EDT 2015
helbig at asclothestro.multivax.de (Phillip Helbig (undress to reply)) writes:
>Assume that a backup saveset was emailed as an attachment with
> Content-Type: application/octet-stream;
>After base64-decoding it, what SET FILE/ATTRIBUTES command is needed to
>fix it, assuming that after decoding it has
> Record format: Stream_LF, maximum 0 bytes, longest 32767 bytes
As others have mentioned, BACKUP/REPAIR is the best way so the following
is obsolete, but maybe this FIX_BACKUP.COM may be useful to someone.
$! make sure we can read the file...
$ Set File /Attrib=(RFM:FIX,MRS:512,LRL=512,ORG=SEQ,RAT=NONE) 'p1'
$ Open/Error=whoops/Read BckSaveset 'p1'
$ Read/Error=whoops BckSaveset Record
$ Close/Nolog BckSaveset
$
$! try to find the blocksize from within the saveset...
$ 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 "unexpected block size"
$ Goto whoops
$ Else
$ Set File/Attrib=(RFM:FIX,LRL='BlockSize',MRS='BlockSize',RAT=none) 'p1'
$ endif
$ exit 1
$WHOOPS:
$ Close/Nolog BckSaveset
$ exit 1
More information about the Info-vax
mailing list