Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID. LONG-ADDITION.
- ENVIRONMENT DIVISION.
- CONFIGURATION SECTION.
- DATA DIVISION.
- FILE SECTION.
- WORKING-STORAGE SECTION.
- 01 START-TIME PIC 9(10) COMP.
- 01 END-TIME PIC 9(10) COMP.
- 01 TIME-ELAPSED PIC 9(10) COMP.
- 01 NUM1 PIC 9(4) VALUE 2.
- 01 NUM2 PIC 9(4) VALUE 2.
- 01 RESULT PIC 9(4).
- 01 COUNTER PIC 9(10) VALUE ZERO.
- 01 MEMORY-LEAK PIC X(1000000).
- PROCEDURE DIVISION.
- BEGIN.
- PERFORM WITH TEST AFTER UNTIL COUNTER = 600000
- ADD 1 TO COUNTER
- MOVE SPACES TO MEMORY-LEAK
- CALL 'CBL_OC_TIME' USING BY CONTENT START-TIME
- CALL 'CBL_OC_TIME' USING BY CONTENT END-TIME
- COMPUTE TIME-ELAPSED = END-TIME - START-TIME
- IF TIME-ELAPSED < 600
- CONTINUE
- ELSE
- EXIT PERFORM
- END-PERFORM
- ADD NUM1 TO NUM2 GIVING RESULT
- DISPLAY "FINALLY, THE RESULT IS: " RESULT
- STOP RUN.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement