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 #4 - Testing/COBOL Programming Course #4 - Testing.md
+209-2Lines changed: 209 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -293,9 +293,216 @@ You can take a look at the COBOL Check wiki page for better understanding: https
293
293
294
294
## Lab
295
295
296
-
In this lab exercise, you will learn to set up your environment for the COBOL Check by connecting to an IBM Z system to access the USS(Unix System Services), view a simple COBOL program and test suites in VS Code, compile them on the USS using COBOL Check to generate a copy of the program under test that includes the test cases and paragraphs to be tested. Then you will copy the newly generated program from USS to MVS datasets and submit JCL to compile the copied COBOL program, and view the output. Refer to “Installation of VS Code and extensions” to configure VS Code if you have not already done so. You can either use IBM Z Open Editor and Zowe Explorer, or Code4z.
296
+
In this lab exercise, you will learn to set up and automate the COBOL Check environment using GitHub Actions. You'll create a GitHub repository that connects to an IBM Z system, accesses USS (Unix System Services), and automates the process of running COBOL Check on sample programs.
297
297
298
-
To proceed further, it's better to have some knowledge of JCL and linux terminal commands.
298
+
299
+
You will:
300
+
301
+
1. Set up a GitHub repository with necessary workflows and scripts.
302
+
303
+
2. Use GitHub Actions to automatically upload COBOL Check files to USS.
304
+
305
+
3. Run COBOL Check on sample programs via automated scripts.
306
+
307
+
4. Automatically copy generated programs from USS to MVS datasets.
308
+
309
+
5. Submit JCL to compile the copied COBOL programs and view the output using Zowe Explorer in VS Code.
310
+
311
+
312
+
This lab introduces modern DevOps practices to mainframe development, demonstrating how to integrate traditional COBOL testing with contemporary CI/CD pipelines.
313
+
314
+
315
+
**Prerequisites:**
316
+
317
+
* GitHub account
318
+
319
+
* Basic knowledge of Git, GitHub, and GitHub Actions
320
+
321
+
* VS Code with Zowe Explorer extension installed
322
+
323
+
* Basic understanding of JCL and Linux terminal commands
324
+
325
+
326
+
Note: While many steps are automated, you'll still interact directly with the mainframe using Zowe Explorer to submit jobs and view results, providing a blend of automated and hands-on experience.
327
+
328
+
329
+
By the end of this lab, you'll have practical experience in setting up an automated testing environment for COBOL programs, bridging the gap between mainframe development and modern DevOps practices.
330
+
331
+
//
332
+
333
+
### Set up a GitHub repository with necessary workflows and scripts
334
+
1.**Create a new GitHub repository**
335
+
- Log into your GitHub account
336
+
- Click the '+' icon in the top right corner and select \"New repository\"
337
+
- Name your repository (e.g., \"cobol-check-automation\")
338
+
- Choose to make it public or private
339
+
- Check the box to \"Add a README file\"
340
+
- Click \"Create repository\"
341
+
342
+
2.**Clone the repository locally**
343
+
- On the repository page, click the green \"Code\" button\n - Copy the HTTPS URL\n - Open your terminal or command prompt
- Ensure both scripts have Unix-style line endings (LF, not CRLF)
487
+
488
+
7. **Add COBOL Check files**
489
+
- Download the latest COBOL Check distribution from the official repository
490
+
- Extract the contents into your `cobol-check` directory
491
+
492
+
8. **Commit and push your changes**
493
+
- Stage your new files: `git add .`
494
+
- Commit the changes: `git commit -m \"Initial setup for COBOL Check automation\"`
495
+
- Push to GitHub: `git push origin main`
496
+
497
+
9. **Verify workflow**
498
+
- Go to the \"Actions\" tab in your GitHub repository
499
+
- You should see the workflow running (triggered by your push)
500
+
- Wait for it to complete and check the logs for any errors
501
+
502
+
503
+
By following these steps, you'll have set up a GitHub repository with the necessary workflow and scripts to automate COBOL Check operations. This setup forms the foundation for the rest of the lab exercises, where you'll use this automation to interact with the mainframe and run COBOL Check on your programs."
504
+
505
+
//
299
506
300
507
1. Get the latest COBOL Check distribution from the GitHub repository of the COBOL Check https://github.com/openmainframeproject/cobol-check/tree/Developer/build/distributions.
301
508
Click on the “View raw” button or the download button on the right most corner. You will get the .zip of COBOL Check.
0 commit comments