Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

space-equal

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
   WORKING-STORAGE SECTION.
   01 WS-NUM1 PIC X(9) VALUE IS SPACE.
   01 WS-NUM2 PIC X(9) VALUE IS SPACE.
   01 WS-NUM3 PIC 9(5).
   01 WS-NUM4 PIC 9(6).

PROCEDURE DIVISION.
   A000-FIRST-PARA.
   MOVE '9' TO WS-NUM1.
   MOVE '10' TO WS-NUM2.
   MOVE 25 TO WS-NUM3.
   MOVE 15 TO WS-NUM4.
   
   IF WS-NUM1 = '9' THEN
      DISPLAY 'IN LOOP 1 - IF BLOCK'
      
      IF WS-NUM2 = '10' THEN
         DISPLAY 'IN LOOP 2 - IF BLOCK'
      ELSE
         DISPLAY 'IN LOOP 2 - ELSE BLOCK'
      END-IF
      
   ELSE
      DISPLAY 'IN LOOP 1 - ELSE BLOCK'
   END-IF.
   
STOP RUN.

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.