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
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2300,6 +2300,7 @@ In this chapter we discuss the concept of structured programming and how it rela
2300
2300
-**Specifying the return value**
2301
2301
2302
2302
-**Summary**
2303
+
-**Lab**
2303
2304
2304
2305
2305
2306
## Styles of programming
@@ -2778,6 +2779,33 @@ Finally, the RETURNING phrase is used to specify the variable that should be use
2778
2779
2779
2780
In summary, this chapter should provide the necessary foundation to understand structured programming and how it relates to COBOL and its importance to understanding and maintaining code. Many examples of how, when and why to implement key techniques have been provided and explained for further understanding. You should be able to identify the basic differences between structured programming (COBOL) and OO programming (Java). You should also understand the general concept of the best practices in the structure of the Procedure Division with reference to the design and content of paragraphs, program control options and ways to call other programs within the same system.
2780
2781
2782
+
2783
+
## Lab
2784
+
2785
+
This lab utilizes COBOL program CBL0003, located within your id.CBL data set, as well as JCL job CBL0003J, located within your id.JCL data set. The JCL jobs are used to compile and execute the COBOL programs, as discussed in previous chapters.
2786
+
2787
+
#### Using VSCode and Zowe Explorer
2788
+
2789
+
1. Take a moment and look over the source code of the COBOL program provided: CBL0003.
2790
+
2791
+
2. Compare CBL0003 with CBL0001 and CBL0002 from the previous lab. Do you notice the differences?
2792
+
2793
+
a. Observe the new COUNTER line within the WORKING-STORAGE > DATA DIVISION.
2794
+
2795
+
b. Observe the paragraphs are numerated and they are all explicitly ended by a -END sentence.
2796
+
2797
+
b. Observe the new paragraphs READ-FIRST-RECORD, READ-TEN-RECORDS, READ-ANOTHER-RECORD, READ-NEXT-RECORDS and CALLING-SUBPROGRAM within the PRECEDURE DIVISION.
2798
+
2799
+
c. These paragraphs perform the same loop as in CBL0001, but using the PERFORM statement in different ways. The CALLING-SUBPROGRAM calls the HELLO program, already presented in the second Lab of this course.
2800
+
2801
+
3. Submit job: CBL0003J. This JCL first compiles the program HELLO,
2802
+
then compiles CBL0003 and links the result of both compilations
2803
+
together.
2804
+
2805
+
4. View CBL0003J output using the JOBS section and open RUN:PRTLINE, observe the report is identical to CBL0001.
2806
+
2807
+
5. View output of target program HELLO using the JOBS section and open RUN:SYSOUT.
0 commit comments