Category: 02. Cobol
-
Data Layout
COBOL layout is the description of use of each field and the values present in it. Following are the data description entries used in COBOL − Redefines Clause Redefines clause is used to define a storage with different data description. If one or more data items are not used simultaneously, then the same storage can…
-
Data Types
Data Division is used to define the variables used in a program. To describe data in COBOL, one must understand the following terms − Data Name Data names must be defined in the Data Division before using them in the Procedure Division. They must have a user-defined name; reserved words cannot be used. Data names…
-
Basic Syntax
Character Set ‘Characters’ are lowest in the hierarchy and they cannot be divided further. The COBOL Character Set includes 78 characters which are shown below − Sr.No. Character & Description 1 A-ZAlphabets(Upper Case) 2 a-zAlphabets (Lower Case) 3 0-9Numeric 4 Space 5 +Plus Sign 6 –Minus Sign or Hyphen 7 *Asterisk 8 /Forward Slash 9…
-
Program Structure
A COBOL program structure consists of divisions as shown in the following image − A brief introduction of these divisions is given below − You can co-relate the above-mentioned terms with the COBOL program in the following example − Divisions A COBOL program consists of four divisions. Identification Division It is the first and only…
-
Environment Setup
Installing COBOL on Windows/Linux There are many Free Mainframe Emulators available for Windows which can be used to write and learn simple COBOL programs. One such emulator is Hercules, which can be easily installed on Windows by following a few simple steps as given below − Hercules is an open-source software implementation of the mainframe…
-
Overview
Introduction to COBOL COBOL is a high-level language. One must understand the way COBOL works. Computers only understand machine code, a binary stream of 0s and 1s. COBOL code must be converted into machine code using a compiler. Run the program source through a compiler. The compiler first checks for any syntax errors and then converts…