OpenVMS - cannot read BACKUP savesets after file transfers such as FTP

OpenVMS - cannot read BACKUP savesets after file transfers such as FTP

Problem

Backup savesets cannot be read by OpenVMS. The BACKUP command fails with error like:

$ BACKUP /LIST DEMO.BCK /SAVE

...

%BACKUP-E-READERRS, excessive error rate reading SYS$SYSROOT:[SYSMGR]DEMO.BCK;1

-BACKUP-E-HDRCRC, software header CRC error

%BACKUP-I-OPERSPEC

%BACKUP-I-OPERASSIST, operator assistance has been requested

%%%%%%%%%%%  OPCOM  18-DEC-2014 17:26:25.22  %%%%%%%%%%%

Request 2, from user SYSTEM on VMS071

%BACKUP-I-OPERSPEC, specify option (QUIT or CONTINUE)

Solution

Record format and record length attributes have to be reset using the following script:

$! RESET_BACKUP_SAVESET_ATTRIBUTES.COM

$!

$! P1  is the specification of the BACKUP saveset

$!

$! This procedure resets the record format and record

$! length attributes of a BACKUP saveset -- savesets

$! can get "broken" during certain sorts of file

$! transfers -- such as FTP.  This procedure reads the

$! (undocumented) saveset record attributes directly

$! out of the target file.

$!

$! 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) -

    'p1'

$

$ Open/Error=whoops/Read BckSaveset 'p1'

$ Read/Error=whoops/End=whoops 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 "Unexpected block size"

$   Goto whoops

$ Else

$   Set File /Attributes=(RFM:FIX,LRL='BlockSize', -

       MRS='BlockSize',RAT=none) -

       'p1'

$ endif

$ exit

$WHOOPS:

$ Write sys$output "Error"

$ exit

Use copy/paste on your OpenVMS system or download the following file:


Example:

$ @RESET_BACKUP_SAVESET_ATTRIBUTES DEMO.BCK



© Stromasys, 1999-2025  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described. 
Need fast, reliable migration? We have done it countless times. Talk to an expert