It can be easily seen from this example that cobol

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ements, which allow COBOL programs to interoperate with other programming languages. With these enhancements, COBOL can now easily make use of application programming interface written for C and other programming languages. >>define operating_system as parameter >>evaluate operating_system >>when "unix" *>>code specific to Unix >>when "win2000" *>code specific to Windows 2000 >>when other display "The specified operating system is unknown to the program" >> end_evaluate 8. File sharing and record locking, which allow the programmer to describe a file with one of the following sharing attributes: "all other", "no other", and "read only". These sharing attributes describe the types of access that a user will allow for other users who access the file simultaneously. A sharing attribute specified with the "open" statement overrides the type of sharing allowed while the file remains open. Users can choose between automatic or manual record locking for a shared file. 9. Object-oriented features, which allow object-oriented concepts such as class, object, inheritance, etc. to be used while writing COBOL programs. COBOL was designed to have the appearance and structure of a business report written in English. Thus, a COBOL program is constructed from sentences, paragraphs, sections and divisions. All COBOL programs must have the following four divisions: 1. Identification Division, which specifies the program and its author. 2. Environment Division, which specifies the computer and the peripherals used to compile and execute the program. If the program is to be processed on a different computer, this division will have to be rewritten. 3. Data Division, which specifies the structure and format of the input and output data files as well as all storage locations used to hold intermediate results and other values during processing. 4. Procedure Division, which contains the sequence of operations to be perf...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online