VMSCD

Section: User Commands (1)
Updated: Jan 1st 2000
Index Return to Main Contents

 

NAME

vmscd - an OpenVMS CD-ROM reader  

SYNOPSIS

vmscd [options] [command]  

DESCRIPTION

This manual page documents the vmscd utility.

vmscd reads the contents of any OpenVMS CD-ROM or more generally any ODS-2 disk volume. Using vmscd, the user can navigate on the CD-ROM, list the content of directories, extract files, view the content of OpenVMS text files or convert them into UNIX format.

ODS-2 (On-Disk Structure, level 2) is the name of the most common file-system on OpenVMS, including CD-ROM's. Starting with OpenVMS V7.2, a new variant (ODS-5) has been introduced. However, all Digital/Compaq CD-ROM's remain in ODS-2 format.

vmscd is a command-line utility. It recognizes several commands (see the COMMANDS section below). Commands can be entered in two modes:

1.
If a vmscd command is passed on the shell command line, after the optional vmscd options, this single command is executed and control is returned to the shell.
2.
If no command is passed on the shell command line, vmscd enters an interactive session. Commands are read from the standard input until the end of file. If the standard input is a terminal, command line editing and recall are available.
 

OPTIONS

vmscd recognizes the following options on the command line:

-c data-cache-size
Specify the size of the data cache in number of 512-bytes blocks. The default value is 10,000 blocks (approximately 5 MB). See the CACHE section below for details.
-d cdrom-device
Define which device vmscd will use to read the CD-ROM. For an actual CD-ROM medium, this should be the name of a block device. This may also be the name of a plain file containing the physical image of a CD-ROM. If this option is not specified, the value of the VMSCDROM environment variable is used. If this variable is not defined, /dev/cdrom is used.
-m metadata-cache-size
Specify the size of the meta-data cache in number of 512-bytes blocks. The default value is 10,000 blocks (approximately 5 MB). See the CACHE section below for details.
-n
Do not display the initial header describing the version of the vmscd utility, the volume name of the CD-ROM and the cache size. Without the -n option, this header is displayed in interactive mode only.
-s
Display the usage statistics of the cache when vmscd terminates. These statistics may also be displayed at any time using the stat command.
-v
Display the version of the vmscd utility and terminate. No command is executed.
 

CACHE

Since accessing a CD-ROM device may be quite slow, especially when spining up the volume, vmscd uses an internal LBN cache. This cache serves the same purpose as the system cache for the classical UNIX file-systems. It retains the content of each LBN (Logical Block Number) on the volume. When the same block is read later on, the cached content will be used.

The LBN cache has a maximum size. When this size is reached, the least recently used block is dropped from the cache.

The LBN cache is divided into two logical areas: the data and the meta-data. The data are the contents of the files on the CD-ROM, excluding the directory files. The meta-data include all file-system structures and the contents of the directory files. To prevent the data from starving the meta-data cache during the copy of large files, the two areas of the cache can be separately sized. See the descriptions of options -c and -m.

Note that the LBN cache is used only when vmscd directly accesses a block device. When the specified device is actually a plain UNIX file containing the physical image of a CD-ROM, the LBN cache is disabled since the UNIX cache is implicitely used.  

FILE FORMATS

OpenVMS uses an intermediate level between the file-system and the application: the Record Management Services (RMS). Consequently, the physical content of a file (as read from the file-system) is generally not what the OpenVMS applications will see using RMS. The ODS-2 volume structure holds various file attributes which are interpreted by RMS to present the correct logical content of the file to the application.

When a file is copied from an ODS-2 volume to a UNIX file system, these attributes are lost. If the file is later copied from this UNIX file system to an OpenVMS system, the OpenVMS applications will likely not correctly interpret the file.

To avoid this, three different methods are provided by vmscd:

.
Converting the file into a UNIX text file. This method is suitable only for files which actually contain text. vmscd recognizes potential OpenVMS text files and can decode the various RMS encoding of the text lines. Use the option -t of the cp command. The decoded content of text files can also be viewed using the cat and more commands. To check whether or not a file can be interpreted as text, use the ls -l command.
.
Creating an additional DCL command file. This file will artificially modify the attributes of the file after copying it back to an OpenVMS system in order to restore the original attributes as stored on the CD-ROM. Use the option -d of the cp command to create this DCL command file.
.
Creating an additional attribute file for the UCX NFS client. When a UNIX file-system is mounted on an OpenVMS system using NFS, the UCX NFS client creates an additional hidden file for each data file created by an OpenVMS application. For a data file FILE.DAT;1 (in OpenVMS notation), the UCX NFS client creates two files on the mounted UNIX file-system: file.dat (the physical content of the data file) and .$ADF$file.dat;1 (the RMS attributes of the data file). vmscd can artificially create such attribute file using the option -u of the cp command. Thus, if the files are copied from the CD-ROM to a UNIX file-system which is NFS-mounted on an OpenVMS system, the file will be correcly interpreted on this OpenVMS system (note: see the BUGS section for limitations).
 

COMMANDS

vmscd recognizes several commands. Empty lines or lines starting with a # are considered as comments and are ignored.

The output of any vmscd command can be redirected to a file using > or >> or piped to the standard input of a shell command using |. The interpretation of >, >> and | is identical to the shell.

The rest of this section describes all vmscd commands in details.

cat [options] cdrom-files ...

This command copies files from the CD-ROM to the standard output. These files must be text files (in any supported OpenVMS text format). They are converted to UNIX text format before being copied.

Options:

-v
Verbose, display the name of files as they are copied.

cd [options] [path]

Change the current working directory on the CD-ROM. The root of the disk is designated by /. Without path argument, the cd command moves back to the root of the CD-ROM.

Options:

-n
Do not display the new working directory. By default, the cd command is followed by a message displaying the complete path of the new working directory.

cp [options] cdrom-files ... destination

This command copies files from the CD-ROM to the UNIX file system. If multiple input cdrom-files are given, the destination must be a directory.

Options:

-a
Copy all files, including system ones. By default, reserved ODS-2 files such as INDEXF.SYS or BITMAP.SYS are not copied.
-d
For each copied data file, create a DCL command file with set file /attributes commands. This command file can be used on an OpenVMS system to restore the attributes of the data file. This option is ignored for text files copied with the -t option.
-n
Do not copy files which are not recognized as being potential OpenVMS text files. This option is essentially useful in conjunction with the -t option.
-r
Recurse into subdirectories to copy all files.
-t
Convert potential OpenVMS text files to UNIX text format. The file is not physically copied. Each RMS record is extracted, copied to the destination and followed by a new-line character.
-u
For each copied data file, create an attribute file for UCX NFS client. If the destination file-system is mounted on an OpenVMS system using the UCX NFS client, the data file will be recognized with the correct RMS attributes. This option is ignored for text files copied with the -t option.
-v
Verbose, display the name of created files.

dump [options] [cdrom-file]

This commands dump the content of a file in hexadecimal and ASCII format.

If a cdrom-file is specified, the VBN's (Virtual Block Numbers) of the file are dumped. By default, the complete content of the file is dumped. Use the option -s to specify a starting block number (VBN's are numbered from 1).

If no file is specified, LBN's (Logical Block Numbers) are dumped from the CD-ROM. The options -s and -c must be given. They specify the starting LBN and count of blocks to dump. (LBN's are numbered from 0).

Options:

-c value
Specify the number of blocks to dump.
-s value
Starting block to dump. With a cdrom-file parameter, it indicates a VBN (numbered from 1). Without the cdrom-file parameter, it indicates a LBN (numbered from 0).

exit

This command exits from the vmscd application. This is a synonym to the quit command.

help [options] [command-name...]

This command describes the vmscd commands. Without parameter, it displays the list of available commands. If one or more command-name are specified, a description of these commands is displayed.

Options:

-a
Display the full description of all commands.

lcd [options] [path]

This command changes the current working directory of the vmscd process. This is the UNIX working directory, on the UNIX file system. Without path argument, the home directory of the user is used.

Options:

-n
Do not display the new working directory. By default, the lcd command is followed by a message displaying the path of the new working directory.

ls [options] [path...]

This command lists files on the CD-ROM. Without path argument, it lists files in the current CD-ROM working directory.

Options:

-a
List all files, including system ones. By default, reserved ODS-2 files such as INDEXF.SYS or BITMAP.SYS are not listed.
-d
List the directory as a file, do not list directory content. By default, if the specified path argument is a directory, its content is listed.
-f
Also display FID (File Identification) values with the name of the files.
-l
Long listing. The following information is displayed:
.
Type of file: D for directories, T for potential text files, B for other files (binary).
.
Size of file in blocks (used/allocated).
.
Size of file in bytes.
-r
Recurse into subdirectories.
-v
List OpenVMS version numbers.

more [options] cdrom-files ...

This command is similar to cat. It copies files from the CD-ROM to the standard output. These files must be text files (in any supported OpenVMS text format).

In addition, the output of the command is piped into a pager program. First, the command looks for an executable file named less in the directories from the PATH environment variable. If it is not found, it looks for one named more.

Options:

-v
Verbose, display the name of files as they are copied.

pwd [options]

This command prints the current working directory on the CD-ROM.

Options:

-f
Also display the FID (File Identification) of the directory.

quit

This command exits from the vmscd application. This is a synonym to the exit command.

stat

The stat command displays statistics about the usage of the local LBN cache. This command takes no parameter and no option.

The command-line option -s of vmscd is equivalent to performing a stat command before exiting.

!shell-command

The character ! executes a shell command.

 

ENVIRONMENT

VMSCDROM
Default device for CD-ROM. If not defined, /dev/cdrom is used. Overriden by the -d option.
 

BUGS

The vmscd utility works on little-endian systems (Intel, Alpha) only. It has been currently tested on Linux for Intel only.

The creation of the attribute files for the UCX NFS client is not fully implemented. Moreover, when this is implemented, due to a bug in UCX the attribute files will not be correctly read by versions of UCX earlier than 5.0.  

AUTHORS

Thierry Lelegard <lelegard@club-internet.fr>  

COPYRIGHT

Copyright is held by the author. The vmscd utility is covered by the "GNU GENERAL PUBLIC LICENSE" (GPL) and may be used and duplicated under the terms of the GPL.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
CACHE
FILE FORMATS
COMMANDS
ENVIRONMENT
BUGS
AUTHORS
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 17:46:13 GMT, March 11, 2000