You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COBOL Programming Course #1 - Getting Started/COBOL Programming Course #1 - Getting Started.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2084,7 +2084,7 @@ COBOL inputs and outputs must be opened to connect the selected internal name to
2084
2084
2085
2085
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.
2086
2086
2087
-

2087
+

2088
2088
2089
2089
*Figure 5. CLOSE-STOP*
2090
2090
@@ -2131,7 +2131,7 @@ Once all statements in the WRITE-RECORD paragraph are executed, then control is
2131
2131
2132
2132
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.
2133
2133
2134
-

2134
+

2135
2135
2136
2136
*Figure 7. Iterative processing*
2137
2137
@@ -3513,14 +3513,14 @@ In Figure 3. the READ-NEXT-RECORD paragraph, located within the PROCEDURE DIVIS
3513
3513
3514
3514
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.
3515
3515
3516
-

3516
+

3517
3517
3518
3518
*Figure 4. COMPUTE statements*
3519
3519
3520
3520
3521
3521
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.
0 commit comments