Module 3: COBOL Program structure
COBOL DATA NAMES AND IDENTIFIERS
- Data names refer to the storage space in the memory where the actual value is stored. This value takes part in the operation when that particular data name is used in the PROCEDURE DIVISION.
- IDENTIFIER is general term which refers to single data name on a data name qualified, Indexed or subscripted. Thus, data names are only one form of identifiers. A data name must be user-defined word and it cannot be reserved word.
Valid Data names Invalid data names and reason EMP-SALARY MOVE (Invalid as it is reserved word) TOT-MARKS 87 (Invalid as there is no letter in data name) B15 B81+31 (Invalid as special character + is used)