IDENTIFICATION DIVISION. PROGRAM-ID. "DATA". DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUM1 PIC 99V9 VALUE IS 3.5. 01 WS-NAME PIC A(6) VALUE 'ABCD'. 01 WS-ID PIC 99 VALUE ZERO. PROCEDURE DIVISION. DISPLAY "WS-NUM1 : " WS-NUM1. DISPLAY "WS-NAME : " WS-NAME. DISPLAY "WS-ID : " WS-ID. STOP RUN.
Write, Run & Share Cobol code online using OneCompiler's Cobol online compiler for free. It's one of the robust, feature-rich online compilers for Cobol language. Getting started with the OneCompiler's Cobol editor is easy and fast. The editor shows sample boilerplate code when you choose language as Cobol and start coding.