Operating System - OpenVMS
1823986 Members
4399 Online
109667 Solutions
New Discussion юеВ

Bytes sizing at VMS7.3-1 and up

 
Alon Jacob
Frequent Advisor

Bytes sizing at VMS7.3-1 and up

As we all know, we can get a disk's free space in Mb and Gb using "$ sh dev/siz=byte".

Can anyone tell me if there's a way of showing file size in Mb or Gb, and also if there's some system parameter to make VMS to give all size output in M/G/bytes?
17 REPLIES 17
Uwe Zessin
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

As far as I can tell, you cannot force the output of MB or GB (do you really like to see 0.000002GB?), but you can choose between blocks and bytes like this:

$ directory/size=units=bytes login.com;

Directory USER01:[ZESSIN]

LOGIN.COM;26 2KB

Total of 1 file, 2KB
$ directory/size login.com

Directory USER01:[ZESSIN]

LOGIN.COM;26 4

Total of 1 file, 4 blocks.
$ set process/units=bytes
$ directory/size login.com

Directory USER01:[ZESSIN]

LOGIN.COM;26 2KB

Total of 1 file, 2KB
$
.
Alon Jacob
Frequent Advisor

Re: Bytes sizing at VMS7.3-1 and up

Hello Uwe.

As far as I can tell the arameter /size=unit=bytes only works only starting 7.3-2, while sh dev/siz=bytes works with 7.3 and up.

I guess there's no way of doing this earlier than 7.3-2.

Alon.
Uwe Zessin
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Yes, it looks like you're right. I just did try it on a system I had access to, but did not bother about the VMS version, sorry.
.
Alon Jacob
Frequent Advisor

Re: Bytes sizing at VMS7.3-1 and up

No prob.

By the way - I have a simple idea on how to get answers allways in kb/mg/gb - you can define a symbol like so - "$ dir :== dir/size=units=bytes", and there you go...
Antoniov.
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Hi to allbodies,
because I have to install new V7.3-2 on our system, I read new feature documentation. I find a commnd useful for you:
$ SET PROCESS /UNIT=BYTES
so all command (not only DIRECTORY) use byte instead blocks.

Antonio Vigliotti
Antonio Maria Vigliotti
Antoniov.
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Sorry Uwe,
I can't read your post :-(

Antonio Vigliotti
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Hello Antonio,
what is the problem?
.
Antoniov.
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Hello Uwe,
this morning I'm still sleeping and I don't read carefully the thread.
I don't want repeat your answer.

Uwe, just for curiosity, do you live in Germany? I read some your answer in night time ;-)

Antonio Vigliotti
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Ah, understood.

You definitely should not try to read my answers when it is dark - you should sleep then ;-)
.
Wim Van den Wyngaert
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Don't put set proc/unit=bytes in your login or sylogin unlesss you are sure that no script/program is parsing the output of dir/siz (I have some scripts that do).

Wim
Wim
Guy Peleg
Respected Contributor

Re: Bytes sizing at VMS7.3-1 and up

In VMS V7.3-1 we added SHOW DEVICE/SIZ=BYTE.
This was a feasibility check to see if
people are interested in VMS displaying
size related information in bytes instead
of blocks.

As the feedback was positive, in VMS V7.3-2
we introduced the B2B project (Blocks
to Bytes), to modify all the utilities
to display size related information in bytes
instead of blocks. As usual with VMS we did not want to break compatibility with previous releases so we introduced
$ SET PROC/UNITS=BYTES. When you set your process to bytes mode, most of the utilities will display size information in bytes.

Most of the utilities will allow you to
specify the mode you are interested in
overriding your current defaults. Assuming
your current setting is blocks, you may still do $ SH MEMORY/UNITS=BYTES.

$SET_PROCESS_PROPETIES allows you to change
the current units with the PPROP$C_UNITS
item code. There is also a $GETJPI item code to return the default units setting for a process.

The next VMS release (V8.2) includes B2B support in SHOW QUOTA and SHOW DEVICE/FULL.
Future releases might allow specifying the
input to various commands in bytes, something similar to the following:

$ MC SYSGEN FOO:[BAR]POO.TXT/SIZE=1.50GB

Regards,

Guy Peleg
OpenVMS Engineering
Jan van den Ende
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

.... and I would bet that goes for most of us, Wim!!! I agree, certainly SYLOGIN looks like a dangerous proposition!.

Jan


Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

Hi Guy,
B2B project is very interesting ...
but byte are too small for current and future sizing.
May be in future version we can use SET PROCESS /UNIT=KB?

Antonio Vigliotti
Antonio Maria Vigliotti
Uwe Zessin
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

It is my understanding that the output automatically sizes the prefix (G/M)B, so you would see 1GB, not 1000KB or 1000000B.
.
Guy Peleg
Respected Contributor

Re: Bytes sizing at VMS7.3-1 and up

Bytes display scales automatically.

1024 bytes are 1KB
1024KB are 1MB
1024MB are 1GB
1024GB are 1TB

Guy
Antoniov.
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up


byte are too small for current and future sizing.
May be in future version we can use SET PROCESS /UNIT=KB?


Now I finished installation of V7.3-2; tryed SET PROC/UNIT=BYTE
Very good: systm display byte or Kb o Mb in the best way.

Congratulation to HP developers.

Antonio Vigliotti
Antonio Maria Vigliotti
John Gillings
Honored Contributor

Re: Bytes sizing at VMS7.3-1 and up

re: Antonio,

> Congratulation to HP developers.

All Guy Peleg's work :-)
A crucible of informative mistakes