Lab1 Lab2
Lab1 Lab2
Objectives
Install node.js
Install Java SDK
Install and run Visual Studio Code
Install Zowe Explorer plugin
Install IBM Z Open Editor plugin
Complete registration
1
Lab 1. Setting up VSCode and Extensions
Lab instructions
Install node.js:
1. Check for node.js installation and verify that the version number is v8 or higher.
Open your workstation's version of the command prompt (called Terminal on Mac OS X). Once
the command prompt is open, use the command in Example 1 to check if your workstation
currently has a version of node.js installed.
V12.16.1
If you do not see a version number after you submit the command, you do not have node.js
installed, or if it shows a version less than v8, you should continue following these instructions.
If you do see a version number and it is v8 or higher, you can move on to section Install Java
SDK.
Updating node.js to the appropriate version number is a relatively simple process because the
installer takes care of most of the "heavy lifting". All you will need to do is visit the Node.js
download site, provided below, and follow the download and installation instructions for your
specific workstation platform. Do this same process if you do not already have node.js installed.
https://nodejs.org/en/download/
This process will install the latest versions of Node.js and the node package manager (npm) and
overwrite any older version files in your system. This removes the step of needing to manually
uninstall the previous versions beforehand.
3. Once completed, verify the installation and proper version number, as shown previously in
Example 1.
Note: The version numbers in our examples are provided purely for reference and may not
reflect the latest versions of the software.
2
Lab 1. Setting up VSCode and Extensions
1. Check for Java installation and verify that the version number is v8 or higher.
Open your workstation's version of the command prompt, if not already open. Once the
command prompt is open, use the command in Example 2 to check if your workstation currently
has a version of Java installed. Java SDK 8 is the preferred version for these labs, however, any
versions higher than that will suffice.
If you do not see a version number after you submit the command, you do not have Java installed
or if it shows a version less than v8, you should continue following these instructions. The
display format of the version number for Java is slightly different than what is displayed for
node.js. With Java, the second value in the displayed version number, i.e. the "8" in Example 2,
is the version number. So, our example is showing Java SDK version 8. If you do see a version
number and it is v8 or higher, you can move on to section Install VSCode.
2. If your version of Java displayed is less than v8, you need to uninstall the current version on
your workstation and reinstall the correct version. Follow the link below to uninstall
instructions that represent your workstation operating system (OS).
Linux: https://www.java.com/en/download/help/linux_uninstall.xml
Mac: https://www.java.com/en/download/help/mac_uninstall_java.xml
Windows: https://www.java.com/en/download/help/uninstall_java.xml
3. Once Java is uninstalled from your workstation, you can click the Java JDK 8 download link
below and follow the installation instructions for your specific OS.
https://www.oracle.com/java/technologies/javase/javase-jdk8-
downloads.html
Note: You will be prompted to register a new Oracle account in order to download the
installation file, please do so. If you have an existing account, you may use that to log in and
continue.
3
Lab 1. Setting up VSCode and Extensions
Install VSCode
If you do not already have VSCode installed on your workstation, please do so now by following
the download and installation instructions at the link below:
https://code.visualstudio.com/download
Note: Be sure to select the correct installation file for your workstations respective OS, shown
in Figure 1.
4
Lab 1. Setting up VSCode and Extensions
Zowe Explorer:
Zowe is a new, and the first open source framework for z/OS and provides solutions for
development and operations teams to securely manage, control, script and develop on the
mainframe like any other cloud platform. Out of the box, the Zowe Explorer provides a lot of
functionality allowing z/OS developers access to jobs, datasets and (USS) files on a z/OS server.
Backed by the Zowe CLI and z/OSMF, developers now have powerful features that makes it
easy to work with z/OS within the familiar VSCode environment. This extension can be used to
edit COBOL and PL/I files opened on z/OS MVS™ and USS using the Zowe extension's Data
Sets and USS views. It can even run JCL and lets you browse job spool files. For more
information on Zowe Explorer and its interaction with z/OS please visit:
https://ibm.github.io/zopeneditor-about/Docs/
interact_zos_zowe_explorer.html
Open VSCode and in the left side tool menu select Extensions. From there, in the "Search
Extensions in Marketplace" search field, type Zowe Explorer. Search results will begin
populating, select "Zowe Explorer" and click install, depicted in Figure 3.
The Zowe community has a number of on-line videos that walk through the steps required to
install, configure and operate the Zowe Explorer, see:
http://www.youtube.com/watch?v=G_WCsFZIWt4&t=0m38s
5
Lab 1. Setting up VSCode and Extensions
IBM Z Open Editor brings COBOL and PL/I language support to Microsoft VSCode. It is one of
the several next generation capabilities for an open development experience for z/OS®. It also
works in association with the Zowe Explorer plugin. For more information on IBM Z Open
Editor, please visit:
https://ibm.github.io/zopeneditor-about/Docs/introduction.html#key-
capabilities
Open VSCode and in the left side tool menu select Extensions. From there, in the "Search
Extensions in Marketplace" search field, type IBM Z Open Editor. Search results will begin
populating, select " IBM Z Open Editor " and click install, depicted in Figure 4.
Note: There may be some limitations with IBM Z Open Editor if running a 32-bit Java version
on Windows.
6
Lab 1. Setting up VSCode and Extensions
Follow the link provided below to register for an account with the mainframe. This account
registration will provide you with a username, password and z/OSMF URL to establish your
connection to the mainframe and must be done before moving on to lab 2.
Registration Link:
https://www-01.ibm.com/events/wwe/ast/mtm/cobolvscode.nsf/
enrollall?openform
7
Lab 2. Connecting to the Mainframe
Objectives
Setup connection profile in Zowe Explorer
Connect to z/OS through connection profile
Filter data sets
Submit “hello world” job
View jobs output
8
Lab 2. Connecting to the Mainframe
Lab instructions
1. The lab assumes installation of VSCode with Z Open Editor and Zowe Explorer extensions
as shown in Figure 1.
3. Zowe Explorer can list Data Sets, Unix System Services (USS) files, and Jobs output as
shown in Figure 3. a “+” will appear when hovering to the far right of the DATA SETS line.
Click the + to define a VSCode profile.
9
Lab 2. Connecting to the Mainframe
4. A box appears to define a new profile. Click + to the left of Create a New Connection to
z/OS as shown in Figure 4.
5. Select a name to enter, then press enter. Figure 5. uses LearnCOBOL as the selected
connection name.
6. VSCode prompts for a z/OSMF URL and port as shown in Figure 6. The z/OSMF URL and
port will be provided in your account registration confirmation email.
10
Lab 2. Connecting to the Mainframe
9. A sample username, Z99998, is entered as shown in Figure 9. You can find your ID in your
account registration confirmation email.
10. The connection prompts for the Username Password as shown in Figure 10. You can find
your username password in your account registration confirmation email.
12. Select False – Accept connections with self-signed certificates to authorize workstation
connection as shown in Figure 12.
11
Lab 2. Connecting to the Mainframe
13. Result is Favorites in the Data Sets, Unix System Services, and Jobs sections as shown in
Figure 13.
14. Again, click on the + to the far right on the Data Sets selection. Result is another prompt to
Create a New Connection to z/OS, the connection you created in step 5 is in the connection
list. Select your connection for the Data Sets available to the previously defined , in our case
LearnCOBOL, connection to z/OS as shown in Figure 14.
15. Expansion of the connection (LearnCOBOL) reads “Use the search button to display
datasets”. Click the search button as shown in Figure 15.
12
Lab 2. Connecting to the Mainframe
16. A prompt to “Select a filter” appears for ID Z99998. Select the + to ‘Create a new filter” as
shown in Figure 16.
17. A prompt appears to enter the filter name to be searched as shown in Figure 17.
18. ID Z99998 has lab data set names that begin the Z99998. Therefore, Z99998 is entered as
the filter to searched for ID Z99998 as shown in Figure 18.
19. A list of data set names beginning with Z99998 for ID Z99998 from z/OS Connection
LearnCOBOL appears as shown in Figure 19.
13
Lab 2. Connecting to the Mainframe
20. Expand Z99998.CBL to view COBOL source members, then select member HELLO to see
a simple COBOL ‘Hello World!’ program as shown in Figure 20. 0.
21. Expand Z99998.JCL to view JCL and select member HELLO which is the JCL to compile
and execute simple ‘Hello World!’ COBOL source code as shown in Figure 21.
14
Lab 2. Connecting to the Mainframe
22. Right click on JCL member HELLO, a section box appears. Select Submit Job for system
to process HELLO JCL as shown in Figure 22. The submitted JCL job compiles the
COBOL HELLO source code, then executes the COBOL HELLO program.
23. Observe the ‘Jobs’ section in Zowe Explorer as shown in Figure 23.
24. Again, click on the + to the far right on the Jobs selection. Result is another prompt to
‘Create new’. Select your connection (LearnCOBOL) from the list as shown in Figure 24.
25. As a result, the JCL jobs owned by ID Z99998 appear. HELLOCBL is the JCL job name
previously submitted. Expand the HELLOCBL output to view sections of the output as
shown in Figure 25.
15
Lab 2. Connecting to the Mainframe
26. 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 26. 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.
27. View the COBOL program execution by selecting COBRUN:SYSOUT(105) from the
LearnCOBOL in the Jobs section of Zowe Explorer as shown in Figure 27.
16
Lab 2. Connecting to the Mainframe
28. The following URL is another excellent document describing the above VSCode and Zowe
Explorer details with examples:
https://marketplace.visualstudio.com/items?
itemName=Zowe.vscode-extension-for-zowe
17