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
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1071,6 +1071,7 @@ This chapter introduces the basics of COBOL syntax. It then demonstrates how to
1071
1071
-**What is a COBOL sentence?**
1072
1072
-**What is a COBOL paragraph?**
1073
1073
-**What is a COBOL section?**
1074
+
-**How to run a COBOL program on z/OS?**
1074
1075
1075
1076
-**COBOL Divisions**
1076
1077
-**COBOL Divisions structure**
@@ -1220,6 +1221,26 @@ A COBOL “Paragraph” is a user-defined or predefined name followed by a perio
1220
1221
1221
1222
A “Section” is either a user-defined or a predefined name followed by a period and consists of zero or more sentences. A “Section” is a collection of paragraphs.
1222
1223
1224
+
### How to run a COBOL program on z/OS?
1225
+
1226
+
When you are dealing with COBOL on z/OS, you will encounter JCL or Job Control Language. JCL is a set of statements that tell the z/OS operating system about the tasks you want it to perform.
1227
+
1228
+
For your COBOL program to be executable in z/OS, you will need to tell the operating system to compile and link-edit the code before running it. All of which will be done using JCL.
1229
+
1230
+
The first thing your JCL should do is compile the COBOL program you have written. In this step, your program is passed to the COBOL compiler to be processed into object code. Next, the output from the compiler will go through the link-edit step. Here a binder will take in the object code and all the necessary libraries and options specified in the JCL to create an executable program. In this step, you can also tell the JCL to include additional data sets which your COBOL program will read. Then, you can run the program.
1231
+
1232
+
To simplify things, Enterprise COBOL for z/OS provides three JCL procedures to compile your code. When using a JCL procedure, we can supply the variable part to cater to a specific use case. Listed below are the procedures available to you:
1233
+
1234
+
1. Compile procedure (IGYWC)
1235
+
2. Compile and link-edit procedure (IGYWCL)
1236
+
3. Compile, link-edit, and run procedure (IGYWCLG)
1237
+
1238
+
Since this course is a COBOL course, the JCL necessary for you to do the Labs is provided for you. Therefore, you will encounter the procedures listed above on the JCL. If you want to create a new COBOL program, you can copy one of the JCL provided and modify it accordingly.
1239
+
1240
+
To read more on JCL, visit the IBM Knowledge Center:
0 commit comments