|
VMS Help Lexicals, F$CUNITS, Example *Conan The Librarian |
$ WRITE SYS$OUTPUT F$CUNITS(1024)
512KB
$ WRITE SYS$OUTPUT F$CUNITS(1024, "BLOCKS")
512KB
$ WRITE SYS$OUTPUT F$CUNITS(1024, "BLOCKS", "BYTES")
512KB
The above examples convert 1024 blocks to the equivalent in
bytes and auto scale the output. The result is 512 KB.
$ WRITE SYS$OUTPUT F$CUNITS(1024, "BLOCKS", "B")
524288B
This example converts 1024 Blocks to non scaled bytes value.
The result is 524288 Bytes.
$ WRITE SYS$OUTPUT F$CUNITS (512,"B", "BLOCKS")
1BLOCKS
This example converts 512 Bytes to the equivalent in Blocks.
The result is 1 Blocks.
$ WRITE SYS$OUTPUT F$CUNITS (10,"KB","B")
10240B
This example converts 10 KB to the equivalent in Bytes. The
result is 10240 Bytes.
$ WRITE SYS$OUTPUT F$CUNITS (1024,"MB","GB")
1GB
This example converts 1024 MB to the equivalent in GB. The
result is 1 GB.
$ WRITE SYS$OUTPUT F$CUNITS(512, "MB", "BLOCKS")
1048576BLOCKS
This example converts 512 MB to the equivalent in BLOCKS. The
result is 1048576 Blocks.
"CONFLICT" warning message is displayed when keyword "BYTES" is
used for other than "BLOCKS" to "BYTES" conversion. For example:
$ WRITE SYS$OUTPUT F$CUNITS (512,"BYTES","BLOCKS")
%DCL-W-CONFLICT, illegal combination of command elements - check documentation
\BYTES\
$ WRITE SYS$OUTPUT F$CUNITS (10,"KB","BYTES")
%DCL-W-CONFLICT, illegal combination of command elements - check documentation
\BYTES\
The correct syntax to be used is as follows:
$ WRITE SYS$OUTPUT F$CUNITS (512,"B", "BLOCKS")
1BLOCKS
$ WRITE SYS$OUTPUT F$CUNITS (10,"KB","B")
10240B
|
|