Skip to content

Commit aa5c573

Browse files
authored
Merge branch 'master' into multithreading
2 parents 64e4e7f + ea72535 commit aa5c573

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ This chapter introduces the basics of COBOL syntax. It then demonstrates how to
10711071
- **What is a COBOL sentence?**
10721072
- **What is a COBOL paragraph?**
10731073
- **What is a COBOL section?**
1074+
- **How to run a COBOL program on z/OS?**
10741075

10751076
- **COBOL Divisions**
10761077
- **COBOL Divisions structure**
@@ -1220,6 +1221,26 @@ A COBOL “Paragraph” is a user-defined or predefined name followed by a perio
12201221

12211222
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.
12221223

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:
1241+
1242+
[https://www.ibm.com/docs/en/zos-basic-skills?topic=collection-basic-jcl-concepts](https://www.ibm.com/docs/en/zos-basic-skills?topic=collection-basic-jcl-concepts)
1243+
12231244
## COBOL Divisions
12241245

12251246
This section introduces the four COBOL Divisions and briefly describes their purpose and characteristics.

0 commit comments

Comments
 (0)