-
Notifications
You must be signed in to change notification settings - Fork 0
/
jack05.cbl
40 lines (32 loc) · 998 Bytes
/
jack05.cbl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
IDENTIFICATION DIVISION.
PROGRAM-ID. JACK04.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 THE-MESSAGE PIC X(50)
VALUE "Jack be nimble,".
01 THE-NUMBER PIC 9(2) VALUE 1.
01 A-SPACE PIC X VALUE " ".
PROCEDURE DIVISION.
PROGRAM-BEGIN.
* Line 1 is set up, so just display it
DISPLAY
THE-NUMBER
A-SPACE
THE-MESSAGE.
* Set up and Display line 2
ADD 1 TO THE-NUMBER.
MOVE "Jack be quick," TO THE-MESSAGE.
DISPLAY
THE-NUMBER
A-SPACE
THE-MESSAGE.
* Set up and display line 3
ADD 1 TO THE-NUMBER.
MOVE "Jack jump over the candlestick." TO THE-MESSAGE.
DISPLAY
THE-NUMBER
A-SPACE
THE-MESSAGE.
PROGRAM-DONE.
STOP RUN.