section10 - Business Oriented Programming Course 92-252-01...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Business Oriented Programming January 27, 2005 Course 92-252-01 – Spring 2005 SECTION 10 – Sequential Files Files hold data. Files are stored on hard disk, magnetic tape or CD-ROM They are used to store a variety of different types of information, such as programs, documents, spreadsheets, videos, sounds, pictures and record-based data. Although COBOL may used to process these other kinds of data file, it is generally used only to process record-based files. There are essentially two types of record-based file organization: 1. Serial Files (COBOL calls these Sequential Files) 2. Direct Access Files. In a Serial File, the records are organized and accessed serially. In a Direct Access File, the records are organized in a manner that allows direct access to a particular record without having the read any of the preceding records. We’ll talk more about this type of organization later in the semester. COBOL is generally used in situations where there is a large volume of data. These systems may be called as “data intensive” systems. This is usually because the same item of information has to be recorded many times. Record-based files are used to record this information. In record-based files; We use the term file , to describe a collection of one or more occurrences (instances) of a record type (template). We use the term r ecord, to describe a collection of fields which record information about an object. We use the term field, to describe an item of information recorded about an object (e.g. StudentName, DateOfBirth). It is important to distinguish between a record occurrence (i.e. the values of a record) and the record type or template (i.e. the structure of the record). Each record occurrence in a file will have a different value but every record in the file will have the same structure. For instance, in the student details file, illustrated below, the occurrences of the student records are actual values in the file. The record type/template describes the structure of each record occurrence. Look at the file called Student.dat It has 3 fields Student ID, Student Name and Date of Birth Student ID StudentName DateofBirth
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9723455 Lamacchia 12301915 ß 9837845 Ricky 08022003 ß These are occurrences 9523567 Lucy 04071989 ß 9898889 Rosebud 02032002 ß Look at the code placed in a Cobol program to describe this file. DATA DIVISION. FILE SECTION FD StudentFile 01 StudentDetailRec. <- Record Type, record template, record structure 02 StudentID PIC 9(7). 02 StudentName PIC X(8).
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/10/2009 for the course CIS 252 taught by Professor Unknown during the Spring '05 term at Bloomsburg.

Page1 / 10

section10 - Business Oriented Programming Course 92-252-01...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online