Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Invalid block size" errors from downloaded savesets

64 views
Skip to first unread message

Jon Wright

unread,
Aug 5, 1994, 12:00:51 PM8/5/94
to
I was just trying to download some savesets from Digital to a system
at my site via the Internet, but what I ended up with was unusable.

I ftp'ed a patch from atlanta.service.digital.com. The files were
your basic VMS savesets--you know, MUMBLE010.A, .B, etc. The files
were transferred in binary mode to my Internet service provider,
halcyon.com. Halcyon uses DECsystem 5000s running Ultrix 4.3.

From halcyon, I used C-Kermit to transfer the files to a VAXstation
running VMS 5.5-2. Again, I specified that the file type was binary.

When I did a BACKUP /LIST of the savesets on the VAX, there was clearly
a problem:

hardy_jwright$ backup/list PWVNECO08010.A;1/saveset
Listing of save set(s)

%BACKUP-E-READERR, error reading DISK$USER:[JWRIGHT]PWVNECO08010.A;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
%BACKUP-E-INVRECSIZ, invalid record size in save set

This clump of errors repeated several times and then I was prompted
to quit or continue.

I did a DIR /FULL of those savesets and compared the results to
some savesets I had copied from the VMS Condist to disk. The only
difference was in the record format field. The files I had ftp'ed
and kermit'ed reported "Fixed length 512 byte records" and the
known good savesets reported "Fixed length 9216 byte records."

So, how do I repair the savesets I downloaded to make them usable?
Presumably I need to somehow alter the record size--how does one
do that? And how does one know what the record size is supposed
to be? Is 9216 standard for Digital distribution savesets?

As always, thank you for the help!


--
-------------------------------------------------------------------
Jon Wright jwr...@halcyon.com 206-803-3014

This message is completely free of trans fatty acids.

Richard Seymour

unread,
Aug 5, 1994, 4:14:09 PM8/5/94
to
In article <31tnnj$e...@nwfocus.wa.com>,
Jon Wright <jwr...@chinook.halcyon.com> wrote:
...about having binary ftp'ing and Kermitting ending up with a BACKUP saveset
with 512-byte blocks, instead of whatever they started out with.
Below is a short Fortran program which will fix it. (i didn't write it,
attribution unknown... but i have -used- it successfully)

> And how does one know what the record size is supposed to be?

...that number -should- have appeared with the /LIST, even with 512-byte blocks.


> Is 9216 standard for Digital distribution savesets?

...what i've seen before have been 2048 or 8192.


INCLUDE '($FABDEF)'
INCLUDE '($RMEDEF)'
RECORD /FABDEF/ MYFAB
INTEGER*4 LENGTH, STATUS, SYS$OPEN, SYS$CLOSE, SYS$MODIFY, BLKSIZ
BYTE FILENAME(80)
MYFAB.FAB$B_BID = FAB$C_BID
MYFAB.FAB$B_BLN = FAB$C_BLN
MYFAB.FAB$L_FNA = %LOC(FILENAME)
MYFAB.FAB$B_FAC = FAB$M_PUT
MYFAB.FAB$L_FOP = IOR(FAB$M_ESC,MYFAB.FAB$L_FOP)
MYFAB.FAB$L_CTX = IOR(RME$C_SETRFM,MYFAB.FAB$L_CTX)
MYFAB.FAB$W_IFI = 0
TYPE *,'REBLOCK -- change block size of VMS binary files'
1 TYPE 5, 'New blocksize: '
5 FORMAT(1X,A,$)
ACCEPT *, BLKSIZ
IF(BLKSIZ .LT. 1 .OR.BLKSIZ .GT. 32767) THEN
TYPE *,' Blocksize must be between 1 and 32767 inclusive.'
GOTO 1
ENDIF
TYPE *, 'Enter filename(s) with Ctl-Z or blank line to terminate'
10 TYPE 5, 'Filename: '
READ(5,20,END=999) LENGTH, (FILENAME(I), I = 1, LENGTH)
20 FORMAT(Q, 80A1)
IF (LENGTH .EQ. 0) GO TO 999
MYFAB.FAB$B_FNS = LENGTH
STATUS = SYS$OPEN(MYFAB, %VAL(0),%VAL(0))
IF (IAND(STATUS, 7) .NE. 1) TYPE *, ' OPEN ERROR. STATUS = ', status
MYFAB.FAB$W_MRS = BLKSIZ
STATUS = SYS$MODIFY(MYFAB, %VAL(0), %VAL(0))
IF (IAND(STATUS, 7) .NE. 1) TYPE *, ' MODIFY ERROR. STATUS = ', status
STATUS = SYS$CLOSE(MYFAB, %VAL(0), %VAL(0))
IF (IAND(STATUS, 7) .NE. 1) TYPE *, ' CLOSE ERROR. STATUS = ', status
GOTO 10
999 END

Arne Vajhoej

unread,
Aug 5, 1994, 6:13:37 PM8/5/94
to
> do that? And how does one know what the record size is supposed
> to be? Is 9216 standard for Digital distribution savesets?

The small program attached below will fix the record-size, so backup
will accept the saveset. You do not even have to tell the program, what
the record-size should be - it does that automatically !

(the program is NOT written by me)

PS: This is both mailed to the poster and posted to the list, since
this question comes up almost every week !

Arne

Arne Vajhøj local DECNET: KO::ARNE
Computer Department PSI: PSI%238310013040::ARNE
Business School of Southern Denmark Internet: AR...@KO.HHS.DK

================================================================================

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$! Name : FIX_SAVSET
$! By : arne
$! Date : 28-NOV-1993 18:45:22.08
$! Using: VMS_SHARE 8.4, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$! James Gray, Michael Bednarek
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$! 1. FIX_SAVESET.C;1
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f=f$parse("SHARE_UNPACK_TEMP","SYS$SCRATCH:."+f$getjpi("","PID"))
$ e="write sys$error ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack: subroutine ! P1=filename, P2=checksum, P3=attributes,P4=size
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);EXITIF INDEX(ERASE_LINE,
"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;PROCEDURE ProcessLine LOCAL c,s,l,b,
n,p;c := ERASE_CHARACTER(1);s := ERASE_LINE;IF c = "X" THEN SPLIT_LINE; ENDIF;
MOVE_HORIZONTAL(-1);l := LENGTH(s);p := 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);
p := p+1;CASE c FROM ' ' TO '`' ['`']: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[
' ']: p:=p+1;[INRANGE,OUTRANGE]: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;
PROCEDURE Decode LOCAL m;POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=
END_OF(b);DELETE(m);IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=
1 THEN SkipPartSep;ELSE ProcessLine;MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;
ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(SUCCESS,OFF);SET(INFORMATIONAL,
OFF);t:="0123456789ABCDEF";f:=GET_INFO(COMMAND_LINE,"file_name");b:=
CREATE_BUFFER(f,f);Decode;WRITE_FILE(b,GET_INFO(COMMAND_LINE,"output_file"));
QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl=&f &f-1 &P1
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X/*`20"Automagically"`20repair`20RMS`20file`20attributes`20of`20a`20BACKUP`20SA
VVESET
X`20*`20(typically`20used`20after`20transfer`20via`20FTP`20in`20BINARY`20mode)
V
X`20*
X`20*`20Usage:
X`20*`20`20`20`20`20`20either
X`20*`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20MCR`20dev:`5Bdir`5DFIX_SAVES
VET`20`20file.bck
X`20*`20`20`20`20`20`20or`20(if`20you`20don't`20like`20MCR)
X`20*`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20FIX_SAVESET`20==`20"$dev:`5B
Vdir`5DFIX_SAVESET"
X`20*`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20FIX_SAVESET`20`20file.bck
X`20*/
X
X/*
X`20*`20Changes`20from`20original`20version:
X`20*`20wjm`2025-mar-1991:`20fixed`20dimension`20of`20"buffer"
X`20*`20wjm`2010-may-1991:`20add`20"ctx=stm"`20to`20accept`20even`20worse`20inp
Vut`20files
X`20*/
X/*
X`20*`20(Originally)`20From:`20`20`20`20`20`20`20`20`20Bill`20Bame`20<bill.ab.u
Vmd.edu!bi...@UMD5.UMD.EDU>
X`20*
X`20*`20Author`20:`20William`20P.`20Bame`20(September`201990)
X`20*`20Purpose:`20Change`20the`20file`20attributes`20of`20a`20saveset`20so`20t
Vhat`20VMS`20BACKUP`20can
X`20*`20`20`20`20`20`20`20`20`20`20read`20it`20again.`20`20Especially`20useful
V`20when`20transferring`20save`20sets`20via
X`20*`20`20`20`20`20`20`20`20`20`20some`20non-DEC`20protocol`20(ftp,`20uucp,`20
Vetc.).
X`20*`20Notes`20`20:`20Tested`20with`20VMS`205.1-1`20through`205.4-1A
X`20*
X`20*`20Disclaimer:`20`20As`20usual,`20use`20at`20your`20own`20risk.
X`20*/
X#include`20<unixio.h>
X#include`20<file.h>
X#include`20<fab.h>
X#define`20RME$C_SETRFM`200x00000001
X
Xmain(argc,argv)
Xint`20argc;
Xchar`20**argv;
X`7B
X`20`20int`20fd,buffer`5B11`5D,status;
X`20`20struct`20FAB`20myfab`20=`20cc$rms_fab;
X
X`20`20if`20(argc`20>=`202)`20`7B
X`20`20`20`20if`20((fd`20=`20open(*++argv,O_RDONLY,0,"ctx=stm"))`20<=`200)`20
V`7B
X`20`20`20`20`20`20perror("open");
X`20`20`20`20`20`20exit();
X`20`20`20`20`7D
X`20`20`20`20else`20`7B
X`20`20`20`20`20`20if`20((read(fd,buffer,44))`20<`200)`20`7B
X`20`20`20`20`20`20`20`20perror("read");
X`20`20`20`20`20`20`20`20exit();
X`20`20`20`20`20`20`7D
X`20`20`20`20`7D
X`20`20`20`20close(fd);
X`20`20`20`20printf("Blocksize`20=`20%d",buffer`5B10`5D);
X`20`20`20`20myfab.fab$b_fac`20=`20FAB$M_PUT;
X`20`20`20`20myfab.fab$l_fop`20`7C=`20FAB$M_ESC;
X`20`20`20`20myfab.fab$l_ctx`20`7C=`20RME$C_SETRFM;
X`20`20`20`20myfab.fab$l_fna`20=`20*argv;
X`20`20`20`20myfab.fab$b_fns`20=`20strlen(*argv);
X`20`20`20`20if`20(((status`20=`20SYS$OPEN(`26myfab,`200,`200))`20`26`207)`20!=
V`201)
X`20`20`20`20`20`20`20`20exit((printf("Couldn't`20open`20%s`5Cn",`20*argv),`20s
Vtatus));
X`20`20`20`20myfab.fab$b_org`20=`20FAB$C_SEQ;
X`20`20`20`20myfab.fab$b_rfm`20=`20FAB$C_FIX;
X`20`20`20`20myfab.fab$w_mrs`20=`20buffer`5B10`5D;
X`20`20`20`20if`20(((status`20=`20SYS$MODIFY(`26myfab,`200,`200))`20`26`207)`20
V!=`201)
X`20`20`20`20`20`20`20`20exit((printf("Couldn't`20modify`20%s`5Cn",`20*argv),
V`20status));
X`20`20`20`20if`20(((status`20=`20SYS$CLOSE(`26myfab,`200,`200))`20`26`207)`20!
V=`201)
X`20`20`20`20`20`20`20`20exit((printf("Couldn't`20close`20%s`5Cn",`20*argv),`20
Vstatus));
X`20`20`7D
X`20`20else`20`7B
X`20`20`20`20printf("usage:`20fix_saveset`20<filename>`5Cn");
X`20`20`20`20exit(1);
X`20`20`7D
X`7D
$ call unpack FIX_SAVESET.C;1 1501104227 "" 5 1 1
$ v=f$verify(v)
$ exit

Dan Wing

unread,
Aug 5, 1994, 5:10:35 PM8/5/94
to
In article <31tnnj$e...@nwfocus.wa.com>, jwr...@chinook.halcyon.com (Jon Wright) writes:
#I did a DIR /FULL of those savesets and compared the results to
#some savesets I had copied from the VMS Condist to disk. The only
#difference was in the record format field. The files I had ftp'ed
#and kermit'ed reported "Fixed length 512 byte records" and the
#known good savesets reported "Fixed length 9216 byte records."
#
#So, how do I repair the savesets I downloaded to make them usable?
#Presumably I need to somehow alter the record size--how does one
#do that? And how does one know what the record size is supposed
#to be? Is 9216 standard for Digital distribution savesets?

Use Joe Meadow's FILE utility, available from ftp.spc.edu in
[.macro32.savesets]. If you're running VMS V6.0 (or V6.1, I don't
recall which version introduced the new qualifier), you can use
$ SET FILE/ATTRIBUTES to change the file's attributes.

-Dan Wing, wi...@tgv.com

Richard Seymour

unread,
Aug 5, 1994, 7:20:34 PM8/5/94
to
>In article <31tnnj$e...@nwfocus.wa.com>,
>Jon Wright <jwr...@chinook.halcyon.com> wrote:
>...about having binary ftp'ing and Kermitting ending up with a BACKUP saveset
> with 512-byte blocks, instead of whatever they started out with.

and you can determine the proper blocksize by:
DUMP/DEC/WORD/block=count:1 saveset

the blocksize will be the twenty-first word of the dump.
---dick

Frank da Cruz

unread,
Aug 6, 1994, 11:34:31 AM8/6/94
to
In article <31uhg2$7...@news.u.washington.edu> sey...@u.washington.edu
(Richard Seymour) writes:
> >In article <31tnnj$e...@nwfocus.wa.com>,
> >Jon Wright <jwr...@chinook.halcyon.com> wrote:
> >...about having binary ftp'ing and Kermitting ending up with a BACKUP
> > saveset with 512-byte blocks, instead of whatever they started out with.
>
Or... you could do it right in the first place. See pages 409-410 of
"Using C-Kermit".

C-Kermit lets you specify the blocksize for an incoming binary file. So:

C-Kermit>set file record-length 32256
C-Kermit>receive
...escape back to PC or whatever...
MS-Kermit>set file type binary
MS-Kermit>send oofa.bck

- Frank

0 new messages