Antinode logo, 8-wide

FIXREC V2.0 - Change File Record Size for VMS (VAX) Before V6.0


The Problem with FTP and File Block Size

Binary FTP on VMS systems can leave a file with a block size (generally 512 bytes = 1 disk block) which differs from its original block size (typically 32256 bytes for a BACKUP save set on disk). This is a particular problem for a BACKUP save set, because the BACKUP program typically fails when the save set block size is changed. For example:

WUSS $ backup /noassist /list test.bck /save_set
Listing of save set(s)

%BACKUP-E-READERR, error reading
SYS$SYSDEVICE:[UTILITY.SOURCE.FIXREC]TEST.BCK;1
-BACKUP-E-BLOCKCRC, software block CRC error
%BACKUP-E-INVBLKSIZE, invalid block size in save set
%BACKUP-E-INVRECSIZ, invalid record size in save set
Save set:          TEST.BCK
Written by:        SYSTEM
UIC:               [000001,000004]
Date:              20-DEC-2003 10:13:53.52
Command:           BACKUP/NOASSIST [.TEST] TEST.BCK/SAVE_SET
Operating system:  VAX/VMS version V5.4
BACKUP version:    V5.4
CPU ID register:   0A000005
Node name:         _WUSS::
Written on:        _WUSS$DKA400:
Block size:        32256
Group size:        10
Buffer count:      4

%BACKUP-E-INVRECSIZ, invalid record size in save set
%BACKUP-E-READERRS, excessive error rate reading SYS$SYSDEVICE:[UTILITY.SOURCE.FIXREC]TEST.BCK;1
-BACKUP-E-HDRCRC, software header CRC error
%BACKUP-I-SPECIFY, specify option (QUIT or CONTINUE)
BACKUP> quit
%BACKUP-F-ABORT, operator requested abort on fatal error


The Ultimate (?) Solution

VMS V8.3 offers a (poorly documented) BACKUP /REPAIR feature which could obviate all this stuff in newer environments.


A (Relatively) Modern Solution

Beginning with VMS V6.0, the DCL command SET FILE /ATTRIBUTES may be used to restore the original block size. Many command procedures are available to do this automatically. Follow this link to one, CNVB.COM, or this link to another, "RESET_BACKUP_SAVESET_FILE_ATTRIBUTES.COM" (dated 24-MAR-2008), from the VMS Freeware collection. (This link may lead to the kit on an HP server.)


An Obsolete Solution

Before VMS V6.0, some anonymous person wrote a program called FIXREC.C (available here as FIXREC.C_ORIG), which could be used to change the block size of a file. It could be compiled cleanly using VAX C, and it used the default BACKUP disk save set block size of 32256 as its default.

Follow this link to a directory containing source, object, and executable files for a revised (improved?) version of FIXREC.C which can also be compiled (more or less) cleanly using DEC C, and which, by default, reads the file to determine the BACKUP save set's original block size.

The object and executable files named *.*_VAXC were made under VMS V5.4, using VAX C V3.1-051.

The object and executable files named *.*_DECC were made under VMS V5.5-2, using DEC C V4.0-000. A minor change to FIXREC.C may be required to eliminate a DEC C compiler warning (caused by a lame declaration in ATRDEF.H). Comments in the code show what to do. The lazy may wish to consider FIXREC.C_DECC.

A Zip archive of the whole collection is available as FIXREC.ZIP


webmaster@antinode.info

© 2016 Steven M. Schweda.