Working Storage Section
The working storage section contains instructions for updating variables in computer memory (such as adding two numbers together). Colloquially, variables are referred to as “data” and the instructions that change variables are considered to be “code”. COBOL provides several variable types: numeric, string, character and date. Numeric variables can store either whole numbers or floating point numbers (base 10 or base 14), while characters (including alphanumeric characters) can store only single values of a given character type. The type of data stored in each variable is specified on the first statement of its right-hand side:
- First line—the data type declaration for each variable. It defines the kind of data the variable will store.
- Second through fifth lines—the initial values for six position spaces (“AAAAA”) within the computer listing.
- Sixth line—the “page layout” statement, which describes how data look and how they’re arranged to be read.
Programming Construction in COBOL
COBOL is a compiled, imperative, procedural programming language designed for business use. It can handle very large numbers and strings. COBOL is still in use today because it’s robust, with an established code base supporting sprawling enterprise-wide programs. Learning to program in COBOL will set you up well for career prospects in fields like banking, insurance, investment management, and much more.
Contact Us