4. Defining Data Part 1

                 4.1 Number Formats
                 4.2 Moving and Editing data
                 4.3 Initializing data



A large portion of any COBOL program consists of the data division and how the data is defined and manipulated. As already described in the previous section (The Four Divisions), each identifier used in the procedure division must be defined. How they are defined depends of what is to be performed on that data.

More on data definition for tables (arrays), Boolean data, and for writing printing data, is discussed in the following section (Defining Data Part 2).

The MOVE verb is used extensively in COBOL to manipulate data and so is introduced here. As the name suggests, MOVE simply tells the computer to place a certain item of data to a specified identifier. a typical statement would be of the form:

MOVE [identifier or literal] TO [identifier-1] [identifier-2]...


1. Getting started 7. File handling
2. COBOL basics 8. Debugging COBOL
3. The Four Divisions 9. Useful links
4. Defining Data Part 1 10. Sample Code
5. Defining Data Part 2 11. Feedback
6. Commands and logic 12. Quick reference
   Awards    HOME
Copyright Timothy R P Brown 2000 - 2005: Web design in Glasgow, Scotland by 404i