Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Use REDEFINES to view same memory as different types.
IDENTIFICATION DIVISION.
PROGRAM-ID. REDEFINES-EXAMPLE.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 NUM-BLOCK PIC 9(4) VALUE 1234.
01 DIGITS REDEFINES NUM-BLOCK.
05 D1 PIC 9.
05 D2 PIC 9.
05 D3 PIC 9.
05 D4 PIC 9.
PROCEDURE DIVISION.
DISPLAY 'Original Number: ' NUM-BLOCK.
DISPLAY 'Digits: ' D1 D2 D3 D4.
STOP RUN.COBOL Variants refer to the different dialects and implementations of COBOL (Common Business-Oriented Language), a legacy programming language widely used in business, finance, and administrative systems.
Origin & Creator
Developed in 1959 by a consortium including CODASYL and led by Grace Hopper to provide a standardized business programming language.
Industrial Note
Extensively used in banking, insurance, government payroll systems, and mainframe applications where decades-old COBOL systems still operate mission-critical workloads.