Openvms guide to file applications
In command format descriptions, vertical bars separate choices within brackets or braces. Within brackets, the choices are optional; within braces, at least one choice is required. Do not type the vertical bars on the command line. In command format descriptions, braces indicate required choices; you must choose at least one of the items listed.
Do not type the braces on the command line. This typeface represents the introduction of a new term. It also represents the name of an argument, an attribute, or a reason. Italic text indicates important information, complete titles of manuals, or variables. Uppercase text indicates a command, the name of a routine, the name of a file, or the abbreviation for a system privilege.
Monospace type indicates code examples and interactive screen displays. In the C programming language, monospace type in text identifies the following elements: keywords, the names of independently compiled external functions and files, syntax summaries, and references to variables or identifiers introduced in an example. A hyphen at the end of a command format description, command line, or code line indicates that the command or statement continues on the following line. All numbers in text are assumed to be decimal unless otherwise noted.
Nondecimal radixesbinary, octal, or hexadecimalare explicitly indicated. Records are stored or retrieved one after another starting at a particular point in the file and continuing in order through the file.
Records are stored and retrieved by relative record number or by file address. Records occupy cells of equal length, and each cell is assigned a relative record number , which represents the cell's position relative to the beginning of the file. When a record is accessed directly by its file address, the distinction is made by its unique location in the file; that is, its record file address RFA. Indexed file records are stored and retrieved by a key in the data record.
Document revision date: 19 July The Script Title Selection menu shows the seven scripts you can choose to help you design your file.
There is no default so you must explicitly select one of the scripts. Choose a disk cluster size of three. Define only one keythe primary key. This menu provides a selection of graphic display types. Select a line plot display. Select , records to be loaded initially. Opt for no additional records after the initial load. Chapter 7 File Sharing and Buffering This chapter discusses the run-time options that are available when opening, connecting, and closing a shared file.
These options are implicit in creating a shared file because the Create service includes an implied file open. File sharing includes file accessing, record locking, and local and shared buffering. Figure shows a typical shared file situation. Timely access to files sometimes requires that more than one active program be allowed to read, write, and modify records within the same file simultaneously.
Whether or not a file can be shared depends on the type of device it resides on and the explicit file-sharing information specified by the processes that access the file. Magnetic tape files cannot be shared because magnetic tape drives are sequentially operated devices. However, disk files can be shared by any combination of readers and writers without restriction. Your program provides the information that enables file sharing.
You control the degree of sharing by providing an explicit file-sharing specification when your program opens or creates a file. This specification indicates the types of file operations that are permitted for application programs that share the file. When a program creates or opens a disk file, it gives two pieces of information needed to determine if and how the file may be shared.
First, it states the types of operations it intends to perform on the file, such as read, write, or update. RMS later checks this information to protect against unauthorized file access. Second, the program specifies the types of operations other concurrently active programs can perform on the file. When the sharing specification of one program is compatible with the sharing specification of another, both programs can gain access to the file simultaneously.
To ensure that multiple programs can access the file simultaneously, you may have to do some schedule planning. A record stream is the access environment in which file records may be read, written, deleted, or updated.
Important elements of the access environment are the current record position if any , the access mode established for the current record, the sequential next record position, and the state of locks on other records in the file.
The Connect service creates a record stream and associates it with a file opened or created by the appropriate service. The connection between a record stream and a file is explicitly terminated by the Disconnect service or is implicitly terminated by closing the file. Record streams are connected to a file in one of three ways: Within one process or across several processes, multiple FABs can be connected to a shared file.
0コメント