COBOL

COBOL Subtract Verb Example

Example of SUBTRACT PROGRAM IDENTIFICATION DIVISION.                                          PROGRAM-ID. PGM005.                                               AUTHOR. MAINFRAMEWIZARD.                                         DATA DIVISION.                                                   WORKING-STORAGE SECTION.                                          01 NUM1  PIC 9(3) VALUE 05.                                       01 NUM2  PIC 9(3) VALUE 10.                                       01 NUM3  PIC 9(3) VALUE 15.                                       01 NUM4  PIC 9(3) VALUE 20.                                       01 NUM5  PIC 9(3) VALUE 55.                                       01 NUM6  PIC

COBOL Subtract Verb Example Read More »

COBOL Example EDITED PICTURE CLAUSE

Example of EDITED PICTURE CLAUSE PROGRAM IDENTIFICATION DIVISION.                                         PROGRAM-ID. PGM008.                                              AUTHOR. MAINFRAMEWIZARD.                                         DATA DIVISION.                                                   WORKING-STORAGE SECTION.                                         01 NUM1  PIC Z999.                                               01 NUM2  PIC **99.                                               01 NUM3  PIC $999.                                               01 NUM4  PIC -999.                                               01 NUM5  PIC +999.                                               01 NUM6  PIC 99CR.                                               01 NUM7  PIC 99DB.                                               01 NUM8  PIC 9.99.                                               01 NUM9  PIC 99,9.                                               01 NUM10 PIC

COBOL Example EDITED PICTURE CLAUSE Read More »

COBOL Interview Questions

COBOL INTERVIEW QUESTIONS  A data name must at least be 8 digits in COBOL A)    True B)    False A sentence in COBOL consists of one or more than statements terminated by a period? A)    True B)    False A level 77 can start in any of AREA A or AREA B? A)    True B)    False RENAME

COBOL Interview Questions Read More »

COBOL Example ACCEPT AND DISPLAY

Example of ACCEPT and DISPLAY PROGRAM IDENTIFICATION DIVISION.                    PROGRAM-ID. PGM001.                         AUTHOR. MAINFRAMEWIZARD.                   DATA DIVISION.                             WORKING-STORAGE SECTION.                    01 VAR1 PIC 9(3) VALUE ZEROES.              PROCEDURE DIVISION.                         10000-MAIN-PARA.                                 ACCEPT VAR1.                                DISPLAY ‘VARIABLE INPUT IS=’ VAR1.          STOP RUN.                                                      

COBOL Example ACCEPT AND DISPLAY Read More »

COBOL EVALUATE TRUE

The following COBOL program depicts the use of         01 WS-SUB   PIC 9  VALUE ZEROS.                   DISPLAY ‘WS-SUB IS GREATER THAN 4’                   DISPLAY ‘WS-SUB IS GREATER THAN 5’                   DISPLAY

COBOL EVALUATE TRUE Read More »

COBOL PERFORM TIMES

The following COBOL program depicts the use of         01 WS-SUB   PIC 9  VALUE ZEROS.              PERFORM 20000-FIRST-PARA 5 TIMES              DISPLAY ‘PARA NAME IS  10000-FIRST-PARA’              DISPLAY ‘VALUE OF WS-SUB IS = ‘ WS-SUB. The ouput

COBOL PERFORM TIMES Read More »