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 #2 - Learning COBOL/COBOL Programming Course #2 - Learning COBOL.md
+65-59Lines changed: 65 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -379,11 +379,11 @@ In this lab exercise, you will connect to an IBM Z system, view a simple COBOL h
379
379
1. IBM Z Open Editor
380
380
2. Zowe Explorer
381
381
382
-

382
+

383
383
384
-
*Figure 2a. The IBM Z Open Editor and Zowe Explorer VSCode extensions*
384
+
*Figure 2a. The IBM Z Open Editor and Zowe Explorer VSCode extensions*
385
385
386
-
If you installed Code4z, the list should include:
386
+
If you installed Code4z, the list should include:
387
387
388
388
1. COBOL Language Support
389
389
2. Zowe Explorer
@@ -396,155 +396,161 @@ If you installed Code4z, the list should include:
396
396
397
397
In these exercises, you will only use the COBOL Language Support and Zowe Explorer extensions.
398
398
399
-

399
+

400
400
401
-
*Figure 2b. The Code4z package of VSCode extensions.*
401
+
*Figure 2b. The Code4z package of VSCode extensions.*
402
402
403
403
**Note:** If your list contains both Z Open Editor and COBOL Language Support, disable one of them, by clicking on the **cog** icon next to the extension in the extensions list, and selecting **disable**.
404
404
405
405
2. Click the Zowe Explorer icon as shown in Figure 3. Zowe Explorer can list Data Sets, Unix System Services (USS) files, and Jobs output.
406
406
407
-

407
+

408
408
409
-
*Figure 3. Zowe Explorer icon*
409
+
*Figure 3. Zowe Explorer icon*
410
410
411
411
3. In order to connect to the lab system, get your team configuration zip file and extract it. You can obtain the team configuration zip file from the [Releases section of the course's GitHub repository](https://github.com/openmainframeproject/cobol-programming-course/releases/latest).
412
412
413
-

413
+

414
414
415
-
*Figure 4. Extract the ZIP file*
415
+
*Figure 4. Extract the ZIP file*
416
416
417
417
4. Open the extracted folder. You will find the two configuration files as shown in Figure 5.
418
418
419
-

419
+

420
420
421
-
*Figure 5. Inside the Team configuration file*
421
+
*Figure 5. Inside the Team configuration file*
422
422
423
423
5. Now back on your VSCode window, select the Explorer tab, and press the "Open folder" button in the left bar.
424
424
425
-

425
+

426
426
427
-
*Figure 6. Click the open folder button*
427
+
*Figure 6. Click the open folder button*
428
428
429
429
6. A pop-up window would show up, select the folder containing the team configuration files.
430
430
431
-

431
+

432
432
433
-
*Figure 7. Select the team Configuration folder*
433
+
*Figure 7a. Select the team Configuration folder*
434
+
435
+
If you are prompted to trust the authors of the files in the folder as shown in Figure 7b, select **Yes, I trust the authors**.
436
+
437
+

438
+
439
+
*Figure 7b. Trust the authors of files the folder*
434
440
435
441
7. Your connection should be added automatically to the Data Sets list as shown in Figure 8a.
436
442
437
-

443
+

438
444
439
-
*Figure 8a. LearnCOBOL Connection*
445
+
*Figure 8a. LearnCOBOL Connection*
440
446
441
447
If the connection does not appear, hover to the far right of the Data Sets line and press the + icon. Afterward, select the **LearnCOBOL** connection as shown in Figure 8b.
9. The connection prompts for a username as shown in Figure 10.
454
460
455
-

461
+

456
462
457
-
*Figure 10. User name prompt*
463
+
*Figure 10. User name prompt*
458
464
459
465
10.**Please enter the username assigned to you! Do not use the sample username of Z99998.** A sample username, is entered as shown in Figure 11. The ID is assigned by the System Administrator.
460
466
461
-

467
+

462
468
463
-
*Figure 11. Specified user name*
469
+
*Figure 11. Specified user name*
464
470
465
471
11. The connection prompts for a password as shown in Figure 12.
466
472
467
-

473
+

468
474
469
-
*Figure 12. Password prompt*
475
+
*Figure 12. Password prompt*
470
476
471
477
12. Enter your assigned password as shown in Figure 13.
472
478
473
-

479
+

474
480
475
-
*Figure 13. Specified password*
481
+
*Figure 13. Specified password*
476
482
477
483
13. Expanding LearnCOBOL shows “Use the search button to display datasets”. Click the magnifying glass icon as shown in Figure 14.
478
484
479
-

485
+

480
486
481
-
*Figure 14. Magnifying glass icon to set a filter*
487
+
*Figure 14. Magnifying glass icon to set a filter*
482
488
483
489
14. A prompt to "Search Data Sets" will appear as shown in Figure 15.
484
490
485
-

491
+

486
492
487
-
*Figure 15. Filter name to be searched*
493
+
*Figure 15. Filter name to be searched*
488
494
489
495
15. Each user has a high-level qualifier that is the same as their username. Therefore, enter your assigned username as the search criteria as shown in Figure 16. **Please enter the username assigned to you! Do not use the sample username of Z99998.**
490
496
491
-

497
+

492
498
493
-
*Figure 16. Entered filter name*
499
+
*Figure 16. Entered filter name*
494
500
495
501
16. A list of data set names beginning with your username will appear as shown in Figure 17.
496
502
497
-

503
+

498
504
499
-
*Figure 17. Filtered data set names*
505
+
*Figure 17. Filtered data set names*
500
506
501
507
17. Expand **`<USERNAME>.CBL`** to view COBOL source members, then select member **HELLO** to see a simple COBOL ‘Hello World!’ program as shown in Figure 18.
502
508
503
-

509
+

504
510
505
-
*Figure 18. `<USERNAME>.CBL`*
511
+
*Figure 18. `<USERNAME>.CBL`*
506
512
507
513
18. Expand **`<USERNAME>.JCL`** to view JCL members and select member HELLO which is the JCL used to compile and execute a simple ‘Hello World!’ COBOL source code as shown in Figure 19.
508
514
509
-

515
+

510
516
511
-
*Figure 19. `<USERNAME>.JCL`*
517
+
*Figure 19. `<USERNAME>.JCL`*
512
518
513
-
19.Right-click on JCL member **HELLO**. A section box appears. Select **Submit Job** for the system to process HELLO JCL as shown in Figure 20. The submitted JCL job compiles the COBOL HELLO source code, then executes the COBOL HELLO program.
519
+
19. Right-click on JCL member **HELLO**. A section box appears. Select **Submit Job** for the system to process HELLO JCL as shown in Figure 20. The submitted JCL job compiles the COBOL HELLO source code, then executes the COBOL HELLO program.
514
520
515
-

521
+

516
522
517
-
*Figure 20. Submit Job*
523
+
*Figure 20. Submit Job*
518
524
519
-
20.Observe the ‘Jobs’ section in Zowe Explorer as shown in Figure 21.
525
+
20. Observe the ‘Jobs’ section in Zowe Explorer as shown in Figure 21.
520
526
521
-

527
+

522
528
523
-
*Figure 21. JOBS section*
529
+
*Figure 21. JOBS section*
524
530
525
-
21.Again, click on the + to the far right on the Jobs selection. The result is another prompt to ‘Create new’. Select **LearnCOBOL** from the list as shown in Figure 22.
531
+
21. Again, click on the + to the far right on the Jobs selection. The result is another prompt to ‘Create new’. Select **LearnCOBOL** from the list as shown in Figure 22.
526
532
527
-

533
+

528
534
529
-
*Figure 22. Select LearnCOBOL connection*
535
+
*Figure 22. Select LearnCOBOL connection*
530
536
531
-
22.As a result, the JCL jobs owned by your username appear. HELLOCBL is the JCL job name previously submitted. Expand **HELLOCBL** output to view sections of the output as shown in Figure 23.
537
+
22. As a result, the JCL jobs owned by your username appear. HELLOCBL is the JCL job name previously submitted. Expand **HELLOCBL** output to view sections of the output as shown in Figure 23.
532
538
533
-

539
+

534
540
535
-
*Figure 23. HELLOCBL output*
541
+
*Figure 23. HELLOCBL output*
536
542
537
-
23.Select **COBRUN:SYSPRINT(101)** to view the COBOL compiler output. Scroll forward in the COBOL compile to locate the COBOL source code compiled into an executable module as shown in Figure 24. Observe the Indicator Area in column 7, A Area beginning in column 8, and B Area beginning in column 12. Also, observe the period (.) scope terminators in the COBOL source.
543
+
23. Select **COBRUN:SYSPRINT(101)** to view the COBOL compiler output. Scroll forward in the COBOL compile to locate the COBOL source code compiled into an executable module as shown in Figure 24. Observe the Indicator Area in column 7, A Area beginning in column 8, and B Area beginning in column 12. Also, observe the period (.) scope terminators in the COBOL source.
538
544
539
-

545
+

540
546
541
-
*Figure 24. COBOL compiler output*
547
+
*Figure 24. COBOL compiler output*
542
548
543
-
24.View the COBOL program execution by selecting **COBRUN:SYSOUT(104)** from the LEARNCOBOL in the Jobs section of Zowe Explorer as shown in Figure 25.
549
+
24. View the COBOL program execution by selecting **COBRUN:SYSOUT(104)** from the LEARNCOBOL in the Jobs section of Zowe Explorer as shown in Figure 25.
544
550
545
-

551
+

546
552
547
-
*Figure 25. COBOL program execution*
553
+
*Figure 25. COBOL program execution*
548
554
549
555
25. Do note that you will need to open the **LearnCOBOL** folder every time you connect to the system, repeating step 5 to 7. To enable your connection profile to be accessible anywhere on your machine, you will need to move your configuration files (i.e. `zowe.config.json` and `zowe.schema.json`) from the LearnCOBOL folder to the Zowe global location. By default this is `C:\Users\%USERNAME%\.zowe` for Windows or `~/.zowe` for Linux and macOS.
0 commit comments