X-Vmsmail-To: SMTP%"ROOTS-L@VM1.NoDak.EDU"
Newsgroups: soc.roots
Date:         Fri, 8 Jan 1993 15:38:57 -0600
Reply-To:     MELODIE SANDERS <MES@VAX2.UTULSA.EDU>
From:         MELODIE SANDERS <MES@VAX2.UTULSA.EDU>
Subject:      RE: Figuring computer blocks to bytes (Thanks for the answers!)
Comments: To: ROOTS-L@VM1.NoDak.EDU

Thank you to all of you who answered my question on the VAX/VMS computer
on how to figure blocks to bytes. With each of the answers, I understood
more with what I'm dealing with.

Here are the answers I received, I figure I must not be the only one out here
trying to figure file size, so maybe others can use the answers too! :-)

From: Fred Romelfanger <fred@stsci.edu>
> VMS is difficult when it comes to record files.  The number of blocks
> is the number of 512 byte blocks your data fills up.  This is a "good"
> uper limit for the actual file size. 128 blocks in a variable length
> record file is <= 64k.  If you want the actual file size under vms you
> have to a dump/file/header and get the last writen block subtract one
> multiply by 512 and add the eof of file byte minus one.  The same
> variable length record file should be the same size under DOS assuming
> <cr><lf> rather than a two byte size at the beginngin of record.  Under
> unix the file will be slightly smaller but the amount by which it is
> smaller is based on the number of records in the file.
>
> Of course this can all get difficult in Open VMS where the blocksizes may
>not be 512 bytes.

From: Tom Sundius U of Helsinki +358 0 1918339 <SUNDIUS@cc.Helsinki.FI>
> The standard VMS block size is 512 bytes, so
> if your file is 33 blocks, for instance, its size will be 33*512=16896
> bytes, or 16.5 kB (i.e., one block is 0.5 kilobytes). In a standard VMS
> text file the records (or fields) usually have a variable length. The
> length which is mentioned in the dir/full listing is the maximum length,
> so you cannot actually calculate the file size from that information
> (if you know the number of records, the file size will of course be at most
> equal to the number of records times the maximum record length). If you
> transfer a VMS text file to another system, it will often be slightly
> smaller, because the VMS variable length records include size information.

From: Rob Bongiovi  <BONGIOVIRP@WORF.ME.VT.EDU>
> A quick and easy way that I use.  A block is 1/2 K.  My 10,000 block
> quota is 5 megs.  This is not quite true, but accurate enough for most
> cases.


From: "JOHN R. LEWIS, PH.D." <VETDSMDV@UTKVT1.VET.UTK.EDU>
> One VAX block is 1/2 K so 73 blocks would be 36.5K


From: root@csoftec.csf.com ( Cliff Manis)
> ----->>> about filesizes on ROOTS-L and GENEALOG !!!!
> I want to make one more comment here for all.
>
> Somewhere about 3 years ago, ALF told me that we should restrict the
> size of normal messages on ROOTS-L to 10 or 15k each, and we have all
> done a great job at that.

And this was the other reason why I wanted to be able to figure blocks
to bytes. It helps to know when to split up the long messages and
when not too... Up to now, I've been taking a very rough estimate.

> In my answer of the 65k file size above I was strictly discussing the
> size of the files that I will unload to GENEALOG.  We surely do not
> need to be sending any files which are 65k long on the ROOTS-L Mailing
> List.  Alf has been on vacation for about two weeks now, and he will
> probably have something to say about this also.  I have been watching
> and administrating ROOTS-L during this period and it has been fun,
> and easy - Thanks to all of you !

> Well - if its for GENEALOG, you would send it to me, and it can be
> anysize, and if need be I'll split it up into multiple files before
> uploading.

Good, that is even better. I'll bundle the Cherokee files up and email
them to you!

> If it a regular post, that's something less than 7 regular pages.
>
> Hope this helps...later..cliff

With a couple of "rules-of-thumb" and several ways of figuring out
more precise measurements of files, I should be able to keep my
sometimes lengthy replies from bouncing on other systems! With the
above help, I figured out that this message is using 9 blocks and is
about 4 1/2K.

Thank you all very much for your help! :-)

Melodie Sanders         Internet: MES@VAX2.UTULSA.EDU
University of Tulsa (Okla.)

P.S. Even as I was editing/writing the above response, more answers came
in from:
Mickey.  <lane@ELWOOD.ENET.DEC.COM> and
Gary Steiner <STEINER@MUPPET.dnet.ge.com>

Thanks everyone! (If I missed anyone, my apologies!)