Skip to content

Commit 2272f4f

Browse files
Merge branch 'master' into issues-contributions
2 parents a1ab9e2 + ed65319 commit 2272f4f

21 files changed

+105
-4
lines changed

COBOL Programming Course #1 - Getting Started/COBOL Programming Course #1 - Getting Started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,7 +2084,7 @@ COBOL inputs and outputs must be opened to connect the selected internal name to
20842084

20852085
COBOL inputs and outputs should be closed at program completion or better yet when the program is done reading from or writing to the internal file name. Figure 5. closes the internal file name ACCT-REC and internal file name PRINT-LINE, then stops processing, STOP RUN.
20862086

2087-
![](Images/image129.jpg)
2087+
![](Images/image129.png)
20882088

20892089
*Figure 5. CLOSE-STOP*
20902090

@@ -2131,7 +2131,7 @@ Once all statements in the WRITE-RECORD paragraph are executed, then control is
21312131

21322132
Again, the READ-RECORD paragraph executes the COBOL READ statement, resulting in the external sequential file populating the variables associated with ACCT-REC internal file name. If ‘AT END’ of records read, Y is moved into the LASTREC variable, then returns control to READ-NEXT-RECORD paragraph. The READ-NEXT-RECORD paragraph would continue the iterative process UNTIL Y is found in the LASTREC variable. Observe #3 in Figure 7.
21332133

2134-
![](Images/image131.jpg)
2134+
![](Images/image131.png)
21352135

21362136
*Figure 7. Iterative processing*
21372137

@@ -3513,14 +3513,14 @@ In Figure 3. the READ-NEXT-RECORD paragraph, located within the PROCEDURE DIVIS
35133513

35143514
Figure 4. is an example of two COMPUTE statements in the paragraph, LIMIT-BALANCE-TOTAL. Notice that the results of the COMPUTE statements are to add client ACCT-LIMIT to the current TLIMIT and add client ACCT-BALANCE to TBALANCE totals each time the paragraph is executed, which is one time for each client record read in our example.
35153515

3516-
![](Images/image162.jpg)
3516+
![](Images/image162.png)
35173517

35183518
*Figure 4. COMPUTE statements*
35193519

35203520

35213521
The WRITE-TLIMIT-TBALANCE paragraph shown in Figure 5. is positioned within the PROCEDURE DIVISION to be executed immediately after all records are read and before the final paragraph that closes the files and terminates program execution.
35223522

3523-
![](Images/image163.jpg)
3523+
![](Images/image163.png)
35243524

35253525
*Figure 5. WRITE-TLIMIT-TBALANCE*
35263526

-10.5 KB
Loading
-43.3 KB
Loading
-17.6 KB
Loading
-2.53 KB
Loading
-3.96 KB
Binary file not shown.
1.01 KB
Loading
Binary file not shown.
12.2 KB
Loading
-5.81 KB
Binary file not shown.

0 commit comments

Comments
 (0)