ntrOduCtiOn LE HANDLING This book presents the basic concepts of file processing using the COBOL computer programming language. This chapter provides a short introduction to files and a framework for the logic which is used in the programs of this book. We are all familiar with files that are not computer related. For exam- ~}le, many files are maintained in file folders in file cabinets. Data in these ~iles may be typed or written, if we want to change these data, we open the file cabinet and make the necessary changes. We can add new records by ~)reparing a new file foMer and including it in the appropriate position in ;he file.Records can be remove(1 an(I discarded when they are no longer :leede(l. l~et s look at a specific example. Suppose that the manager of a dormi- Lory facility has a file on paper in which information about residents is main- :ained.There is one file folder for each resident. Each folder contains a ~ esident s name, room number, sex, and other\" information. The records are placed in alphabetical order\" by the resident s name. As people move n and out of the dormitory, records are added or deleted. As people :hange rooms the file is opened, and room numbers are changed. In this example the total collection of information is a file. A file is a : ollection of records which are related in some way and which are main- .ained in some order. Here we have established information about indi- dduals living in a dormitory in order by name. The information about one individual is a record. In out\" record we have
|
商品评论(0条)