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
+9-36Lines changed: 9 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -524,9 +524,6 @@ This section introduces the Code4z extension package, in particular the COBOL La
524
524
-**Syntax Highlighting and Coloring**
525
525
-**Syntax and Semantic Check**
526
526
-**Navigation of Code**
527
-
-**Breadcrumb View**
528
-
-**Outline View**
529
-
-**Shortcuts**
530
527
-**Go To Definition**
531
528
-**Find All References**
532
529
-**Copybook Support**
@@ -535,19 +532,19 @@ This section introduces the Code4z extension package, in particular the COBOL La
535
532
536
533
## What is Code4z?
537
534
538
-
Code4z is an all-in-one, open-source mainframe extension package for Visual Studio Code. The Code4z package contains extensions which provide language support for COBOL and High Level Assembler language, a debugger for COBOL programs running on a CICS region, as well as tools which enable developers to access mainframe data sets and CA Endevor code repositories using the Visual Studio Code interface. This guide focuses on the COBOL Language Support extension. The Zowe Explorer extension is also included in the Code4z package.
535
+
Code4z is an all-in-one, open-source mainframe extension package for Visual Studio Code. The Code4z package contains extensions which provide language support for COBOL and High Level Assembler language, a debugger for COBOL programs, as well as tools which enable developers to access mainframe data sets and CA Endevor code repositories using the Visual Studio Code interface. This guide focuses on the COBOL Language Support extension. The Zowe Explorer extension is also included in the Code4z package.
539
536
540
537
The COBOL Language Support extension leverages the Language Server Protocol to provide autocomplete, highlighting, and diagnostic features for COBOL code. Together with Zowe Explorer, you can load COBOL code from a mainframe data set, and edit it leveraging the LSP features of the extension. Once you finish editing, you can save the file back on the mainframe, and store a copy locally.
541
538
542
539
The Code4z Extension Pack can be installed into VS Code by searching the Extensions Marketplace inside VS Code for "Code4z" and selecting install. The extension pack contains a number of extensions that can be leveraged when working with the mainframe, including the COBOL Language Support extension which provides similar functionality to the Z Open Editor extension discussed earlier. Therefore, ensure only one of these two extensions is enabled. Other extensions included in the pack will work with either COBOL Language Support or Z Open Editor. To see more detailed instructions on installing this extension, refer to "Installation of VSCode and Extensions".
543
540
544
541
## Known File Extensions
545
542
546
-
Code4z recognises files with the extension .COB and .CBL as COBOL files. This applies to both local files and files held in a PDS on the mainframe. COBOL Language Support features are automatically enabled when you open any file with an extension identifying it as a COBOL file.
543
+
Code4z recognizes files with the extensions .COB and .CBL as COBOL files. This applies to both local files and files held in a PDS on the mainframe. COBOL Language Support features are automatically enabled when you open any file with an extension identifying it as a COBOL file.
547
544
548
545
## Syntax Highlighting and Coloring
549
546
550
-
The Code4z package enables coloring of keywords, paragraphs, and variables in different colors to make the code easier to navigate.
547
+
The COBOL Language Support extension enables coloring of keywords, paragraphs, and variables in different colors to make the code easier to navigate.
551
548
552
549
## Syntax and Semantic Check
553
550
@@ -559,63 +556,39 @@ The COBOL Language Support extension checks for mistakes and errors in COBOL cod
559
556
560
557
## Navigation of Code
561
558
562
-
The Code4z package enables several features for ease of navigation through code.
563
-
564
-
### Breadcrumb View
565
-
566
-
The breadcrumb view across the top of the editor shows where the current line of code exists within the structure of the COBOL source code. You can click each element on the bar to see that section of the code highlighted, or to select a code element within the section and navigate to it.
567
-
568
-

569
-
570
-
*Figure 2. Breadcrumb view.*
571
-
572
-
### Outline View
573
-
574
-
The Code4z package enables the outline view tab in the sidebar. Outline view enables you to easily navigate through sections and individual variables and paragraphs.
575
-
576
-
### Shortcuts
577
-
578
-
You can use the following shortcuts to navigate through your code:
579
-
580
-
***CTRL+ALT+,** moves you one section back.
581
-
***CTRL+ALT+.** moves you one section forward.
582
-
***CTRL+ALT+D** takes you to the data division.
583
-
***CTRL+ALT+P** takes you to the procedure division.
584
-
***CTRL+ALT+W** takes you to the working storage section.
585
-
586
-
These commands are also available if you right click anywhere in the code.
559
+
The COBOL Language Support extension enables several features for ease of navigation through code.
587
560
588
561
### Go To Definition
589
562
590
563
While your cursor is placed on a variable or paragraph name, you can press **F12** or **CTRL+click** to use the **Go To Definition** functionality to display the point in the code where the variable or paragraph is defined.
591
564
592
565

593
566
594
-
*Figure 3. Go To Definition shows the point at which the USER-STREET variable is first defined.*
567
+
*Figure 2. Go To Definition shows the point at which the USER-STREET variable is first defined.*
595
568
596
569
### Find All References
597
570
598
571
The **Find All References** functionality (**SHIFT+ALT+F12**) highlights all references to a variable or paragraph and displays them in a list in the sidebar, so that you can easily navigate between them.
599
572
600
573

601
574
602
-
*Figure 4. Find All References lists all references to the USER-STREET variable in the code.*
575
+
*Figure 3. Find All References lists all references to the USER-STREET variable in the code.*
603
576
604
577
## Copybook Support
605
578
606
-
Copybooks are pieces of source code stored in separate data sets which are referenced in a program. The COBOL Language Support extension enables you to download all copybooks referenced in your program from the mainframe to a folder on your machine. In order for this feature to work, you need to set up and configure a Zowe CLI `zosmf` profile.
579
+
Copybooks are pieces of source code stored in separate data sets which are referenced in a program. The COBOL Language Support extension enables you to download all copybooks referenced in your program from the mainframe to a folder in your workspace. In order for this feature to work, you need to set up and configure a Zowe CLI `zosmf` profile. You can also enable support for copybooks stored locally in folders in your workspace. This is useful when working with a COBOL project stored in a Github repository.
607
580
608
581
The COBOL Language Support extension helps to ensure that copybooks called in the code remain compatible through semantic analysis of keywords, variables, and paragraphs within copybooks, and ensures the consistency of code by defining variables and paragraphs across copybooks. The extension also helps to protect against unwanted errors caused by recursive or missing copybooks.
609
582
610
-
The **Go To Definition** and **Find All References** functionalities are also extended to work for occurrences of variables and paragraphs from copybooks called in the program as well as from the program itself.
583
+
The **Go To Definition** and **Find All References** functionalities are extended to work for occurrences of variables and paragraphs from copybooks called in the program as well as from the program itself. You can also use the **Go To Definition** feature on a copybook name in order to open it.
611
584
612
585
## Autocomplete
613
586
614
587
The COBOL Language Support extension provides live suggestions while you type for COBOL keywords, as well as variables and paragraphs which are already referenced in the code or in copybooks used by the program.
615
588
616
589

617
590
618
-
*Figure 5. Autocomplete lists possible variables and keywords beginning with the typed string in a list.*
591
+
*Figure 4. Autocomplete lists possible variables and keywords beginning with the typed string in a list.*
0 commit comments