![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS Record Management Services Reference ManualOrder Number: AA-PV6RD-TK
April 2001
This reference manual contains general information intended for use in any OpenVMS programming language, as well as specific information on writing programs that use OpenVMS Record Management Services (OpenVMS RMS). Revision/Update Information: This manual supersedes the OpenVMS Record Management Services Reference Manual, OpenVMS Alpha Version 7.2 and OpenVMS VAX Version 7.2
Software Version:
OpenVMS Alpha Version 7.3
© 2001 Compaq Computer Corporation
Compaq, AlphaServer, VAX, VMS, the Compaq logo Registered in U.S.
Alpha, PATHWORKS, DECnet, DEC, and OpenVMS are trademarks of Compaq Information Technologies Group, L.P. in the United States and other countries. UNIX and X/Open are trademarks of The Open Group in the United States and other countries. All other product names mentioned herein may be the trademarks of their respective companies. Confidential computer software. Valid license from Compaq required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.
ZK4523 The Compaq OpenVMS documentation set is available on CD-ROM.
PrefaceIntended AudienceThis document describes OpenVMS Record Management Services (RMS) control blocks and services for programmers. Document StructureThis document consists of three parts and two appendixes.
Related DocumentsThe following documents contain information related to this reference manual:
For additional information about Compaq OpenVMS products and services, access the Compaq website at the following location:
Reader's CommentsCompaq welcomes your comments on this manual. Please send comments to either of the following addresses:
How To Order Additional DocumentationUse the following World Wide Web address to order additional documentation:
If you need help deciding which documentation best meets your needs, call 800-282-6672. ConventionsIn this manual, any reference to OpenVMS is synonymous with Compaq OpenVMS. VMScluster systems are now referred to as OpenVMS Cluster systems. Unless otherwise specified, references to OpenVMS Clusters or clusters in this document are synonymous with VMSclusters. The following conventions are used in this manual:
Part 1
Part I introduces the reader to general mechanisms and conventions
associated with Record Management Services (RMS). It discusses the
following topics:
|
Service Name | Macro Name | Description |
---|---|---|
File Processing and File Naming Macros | ||
SYS$CLOSE | $CLOSE | Terminates file processing and disconnects all record streams previously associated with the file |
SYS$CREATE | $CREATE | Creates and opens a new file |
SYS$DISPLAY | $DISPLAY | Returns the opened file's attributes to the application program |
SYS$ENTER 1 | $ENTER | Enters a file name into a directory |
SYS$ERASE | $ERASE | Deletes a file and removes its directory entry |
SYS$EXTEND | $EXTEND | Allocates additional space to a file |
SYS$OPEN | $OPEN | Opens an existing file and initiates file processing |
SYS$PARSE | $PARSE | Parses a file specification |
SYS$REMOVE 1 | $REMOVE | Removes a file name from a directory but does not actually delete the file data; compare this with the $ERASE macro |
SYS$RENAME | $RENAME | Assigns a new name to (renames) a file |
SYS$SEARCH | $SEARCH | Searches a directory, or possibly multiple directories, for a file name |
Record Processing Macros | ||
SYS$CONNECT | $CONNECT | Establishes a record stream by associating a RAB with an open file |
SYS$DELETE | $DELETE | Deletes a record from a relative or indexed file |
SYS$DISCONNECT | $DISCONNECT | Terminates a record stream by disconnecting a RAB from an open file |
SYS$FIND | $FIND | Locates the specified record, establishes it as the current record and returns the record's RFA to the application program |
SYS$FLUSH | $FLUSH | Writes (flushes) modified I/O buffers and file attributes to the disk before closing a file |
SYS$FREE | $FREE | Unlocks all records previously locked by the record stream |
SYS$GET | $GET | Retrieves a record from a file |
SYS$NXTVOL 1 | $NXTVOL | Causes processing of a magnetic tape file to continue to the next volume of a volume set |
SYS$PUT | $PUT | Writes a new record to a file |
SYS$RELEASE | $RELEASE | Unlocks a record pointed to by the contents of the RAB$W_RFA field |
SYS$REWIND | $REWIND | Establishes the first file record as the current record |
SYS$TRUNCATE | $TRUNCATE | Truncates a sequential file |
SYS$UPDATE | $UPDATE | Deletes and rewrites (updates) an existing file record |
SYS$WAIT | $WAIT | Awaits the completion of an asynchronous record operation |
Block I/O Processing Macros | ||
SYS$READ | $READ | Retrieves a specified number of bytes from a file, beginning on block boundaries |
SYS$SPACE | $SPACE | Positions forward or backward in a file to a block boundary |
SYS$WRITE | $WRITE | Writes a specified number of bytes to a file, beginning on block boundaries |
Although RMS supports unit-record devices, such as terminals and printers, it primarily provides a comprehensive software interface to mass storage devices, such as disk and magnetic tape drives.
RMS provides a variety of disk file organizations, record formats, and record access modes from which you can select the appropriate processing techniques for your application. RMS supports sequential, relative, and indexed file organizations, and fixed-length and variable-length record formats are supported for each file organization. (Relative and sequential files also support other record formats.) The RMS record access modes permit you to access records sequentially, directly by key value, directly by relative record number, or directly by record file address (RFA). RMS also provides a means of performing block I/O operations for users with certain performance-critical applications (such applications may require user-defined file organizations or record formats, or both).
RMS ensures safe and efficient file sharing by providing:
RMS also enforces the security requirements of a multiuser system with potential multinode access by restricting file access to one or more user types and a list of user names.
For systems that support network capabilities, RMS provides a subset of
file and record management services through the data access protocol
(DAP) to remote network nodes. Network DAP remote file operations are
generally transparent to application programs.
1.2 Passing Arguments to RMS
RMS flexibility requires application programs to pass a multitude of
arguments to RMS services for doing common operations such as file
creation and file access. To minimize the problems associated with
passing numerous arguments for each service call, the application
program places the arguments in one or more data control blocks before
it invokes a record management service. The only argument required for
most services is the symbolic address of the appropriate data control
block.
1.2.1 Record Management Services and Control Blocks
Because RMS operates on files and records, its services generally belong to one of two groups:
To support service operations, RMS provides two types of control blocks:
File services use a control block called the file access block (FAB). When creating a file, the user must store arguments in the FAB that define the file characteristics, the file specification, and certain run-time access options. When your process opens an existing file, the FAB specifies only the file specification and the run-time access options.
There are three categories of FAB arguments; the following list briefly introduces each category.
The two types of optional control blocks that can supplement or supersede the information in the FAB are the extended attribute block (XAB, pronounced "zab") and the NAM or NAML block.
A XAB usually supersedes and supplements the file characteristics specified in the associated FAB, and multiple XABs may support a single file. There are several types of XABs, each of which is used for a different purpose. Each type of XAB has a 6-letter mnemonic name consisting of the prefix "XAB" followed by a 3-letter mnemonic that relates to the XAB function. For instance, the XAB that supplements and supersedes the file allocation information in the FAB is called an allocation control XAB, or XABALL.
The XABs used for file operations are briefly described in the following list:
Next | Contents | Index |