Sie sind auf Seite 1von 2

BDP Lecture Notes - 46 FILE CHARACTERSTICS

UNIT 7

The task of file handling is the responsibility of the system software known as IOCS (Input Output Control System). The different file characteristics are Record size: The size of the record in a tape or disk file can be defined by the programmer. While preparing the record layout we can fix the suitable sizes for the individual fields in a record. The record should not be less than 2characters in length and cannot exceed 2048 characters in length. A file can contain either fixed or variable length records. Block size: A block is combination of individual records .for example, a block consists of 10 records which can be considered as the first block of the file, the next 10 consecutive records can be considered as the second block of the file and so on. These consecutive records which are formed as a group is known as a block or physical record. The number of records in a block is called as the blocking factor. The blocking is generally taken care of IOCS. When a file is blocked read or writes operation is only applicable to the entire block and not to the individual records in the block. Thus the read and write statements in the program are logical operations. The records defined in the program are sometimes called as logical records and the blocks where records are stored on the file medium are called as physical records. It may be noted that in most cases, the size of final block of the file will be shorter than the specified block size. This final block is often called as short block. This is to be specially treated and is taken care by the IOCS. Record size Block size Buffer Label records or Disk directory

BDP Lecture Notes - 46

UNIT 7

Buffers: A buffer is a temporary storage area where the read data is temporarily stored in the buffer. Modern computers are capable of handling input-output operations independently of the CPU by means of the hardware known as Data channel. This enables the overlapping of the input-output operations with other CPU operations. To take advantage of this situation IOCS normally requires more than one buffer for a file. The programmer may specify the number of buffers the IOCS should use. LABEL RECORDS OR DISK DIRECTORY: The most important information of a file is stored in the header label known as file title. The file title is the name assigned to the file and is used for the purpose of its identification. It may be noted that the file title is different from the file name used in a COBOL program. Within the boundary of the program the file is referred to by the file name and not by its title. The title is the physical name that is assigned by the IOCS to the program. When a file is created on one computer and is to be read on another computer, the files are normally created without the header and trailer labels. Such files are more than one file is stored on a disk the IOCS maintain a disk directory for all the files.

Das könnte Ihnen auch gefallen