Operating System - OpenVMS
1752376 Members
5533 Online
108787 Solutions
New Discussion юеВ

Re: Limit in DIR filesize....

 
SOLVED
Go to solution
Willem Grooters
Honored Contributor

Limit in DIR filesize....

VMS 7.3-1, BIG files:
If a file exceeds 9999999 blocks, DIR cannot show the size properly:

BPS2004A> dir dka200:[backup]/siz

Directory DKA200:[BACKUP]

BCK100.BCK;4 6459831

Total of 1 file, 6459831 blocks.
BPS2004A> dir dka300:[backup]/siz

Directory DKA300:[BACKUP]

BCK200.BCK;6 *******

Total of 1 file, 14250159 blocks.
BPS2004A>

Is this a bug or an (undocumented) feature?

(Dir/full has no porblem. Just dir/siz. dir/siz=all has the same problem for both used and allocated sizes:

BPS2004A> dir dka300:[backup]/siz=all

Directory DKA300:[BACKUP]

BCK200.BCK;6 *******/*******

Total of 1 file, 14250159/14250159 blocks.

Willem Grooters
OpenVMS Developer & System Manager
8 REPLIES 8
David B Sneddon
Honored Contributor
Solution

Re: Limit in DIR filesize....

You can specify a /WIDTH=(SIZE=n) on the directory command to set the width.
I always use /WIDTH=(FILE=36,SIZE=8).
Enemy
Advisor

Re: Limit in DIR filesize....

Use $dir/full instead
Martin P.J. Zinser
Honored Contributor

Re: Limit in DIR filesize....

Hello Willem,

this is a way old issue (I've encountered that first about 10 years ago). Given the "****" I always suspected dir might be written in Fortran, which behaves exactly like that in case you try to format a number which is too large ;-)

Greetings, Martin
Hein van den Heuvel
Honored Contributor

Re: Limit in DIR filesize....

$ write sys$output f$fao ("!4UL", 12345)
****
$ write sys$output f$fao ("!4UL", 1234)
1234
$
Ian Miller.
Honored Contributor

Re: Limit in DIR filesize....

DIRECTORY appears to be written in BLISS. I suspect this is a documented feature. The width of the size field defaults to 6 before VMS V6.0 and 7 from V6.0 onwards (according to HELP DIRECTORY /WIDTH)
____________________
Purely Personal Opinion
Mike Naime
Honored Contributor

Re: Limit in DIR filesize....

There is a similar problem with SHO DEV D when your LUN is larger than 499GB :-)

you can also specify the width there as well.
VMS SAN mechanic
John Gillings
Honored Contributor

Re: Limit in DIR filesize....

Upgrade to V7.3-2!

$ SET PROCESS/UNIT=BYTES

will cause DIRECTORY (and most other places where file sizes are shown) to display file sizes as bytes, KB, MB, GB, TB, or PB (as appropriate).

Your example file would display as:

BPS2004A> dir dka300:[backup]/siz=all

Directory DKA300:[BACKUP]

BCK200.BCK;6 6.79GB/6.79GB

Total of 1 file, 6.79GB/6.79GB


$ SET PROCESS/UNIT=BLOCKS (V7.3-1 behaviour) is the default.

As mentioned earlier,

DIRECTORY/WIDTH=(field:width,field:width...)

can be used for fine grained control of the directory display. It's been around since about V5.0
A crucible of informative mistakes
Willem Grooters
Honored Contributor

Re: Limit in DIR filesize....

To all:
I _should_ have read the manuals. But it's a long time ago that I've seen files this big, so I just ran into it and wondered about it.
Since files are getting bigger and biggger (thanks to databases...) it would be a nice consideration to enlarge this default output to 8 or even 10 positions. (Guy, keep this in mind for 8.2....)
Willem Grooters
OpenVMS Developer & System Manager