Skip to content

Commit 4a8aee0

Browse files
committed
COBOL API Lab
Signed-off-by: MikeBauerCA <[email protected]>
1 parent 44c0fad commit 4a8aee0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

COBOL Programming Course #2 - Advanced Topics/COBOL Programming Course #2 - Advanced Topics.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,34 @@ In large enterprise, the roles and responsibilities are divided for a number of
162162
Enterprise COBOL is a learning journey. Each Enterprise COBOL API is a separate learning journey. As is the case with most professional endeavors, learning, repetition, and applying what is learned is re-iterative process leading to advanced skill levels.
163163

164164
## Lab
165+
The lab contains data used in previous labs from "COBOL Programming Course #1 - Getting Started" where the data source was sequential data set, then a VSAM data set. The lab provides JCL to create a personal Db2 table in a DBA-created database name using a DBA-created storage group. The DBA-created storage group directs the create tablespace and table to specific disk storage volumes.
166+
167+
The lab contains Enterprise COBOL source code with Db2 APIs along with the JCL to compile and execute the COBOL programs.
165168

166169
### Using VSCode and Zowe Explorer
170+
Zowe Explorer is currently without the ability to execute Db2 SQL interactively. It is inevitable Zowe Explorer will eventually have the capability of connectiong to relational databases and executing SQL.
171+
172+
Therefore, JCL members were created to create and load user tables following examples provided.
173+
174+
1. Submit `zos.public.db2.jcl(db2setup)`
175+
The result is new JCL and CBL members copied into personal JCL and CBL libraries
176+
177+
2. SUBMIT JCL(CRETBL)
178+
The result is a personal Db2 tablespace, table, indexspace, and index
179+
180+
3. SUBMIT JCL(LOADTBL)
181+
The result is data loaded into the personal Db2 tablespace, table, indexspace, and index
182+
183+
4. Edit each COBOL source code member in your CBL partition data set changing all occurrences of Z# to your personal ID. Example - If your ID was Z80001, then change all occurrences of Z# to Z80001.
184+
185+
5. SUBMIT JCL(CBLDB21C)
186+
The result is compile of CBL program CBLDB21 and a Db2 Plan needed for program execution
187+
188+
6. SUBMIT JCL(CBLDB21R)
189+
The result is execution of COBOL program CBLDB21 to read the Db2 table and write each record from the Db2 table .
190+
191+
7. Two additional COBOL programs with Db2 API exist, CBLDB22 and CBLDB23 using the same Db2 table as the data source.
192+
167193

168194
\newpage
169195
# COBOL Challenges

0 commit comments

Comments
 (0)