-
Notifications
You must be signed in to change notification settings - Fork 0
/
jack03.cbl
43 lines (35 loc) · 1.06 KB
/
jack03.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
41
42
43
IDENTIFICATION DIVISION.
PROGRAM-ID. JACK01.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 THE-MESSAGE PIC X(50).
01 THE-NUMBER PIC 9(2).
01 A-SPACE PIC X.
PROCEDURE DIVISION.
PROGRAM-BEGIN.
* Initialize the space variable
MOVE " " to A-SPACE.
* Set up and display line 1
MOVE 1 TO THE-NUMBER.
MOVE "Jack be nimble," TO THE-MESSAGE.
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.