Ever wondered how to connect Zowe CLI to the IBM Master the Mainframe contest’s mainframe? Or how to use VSCode with Master the Mainframe’s mainframe? This will be a thorough guide on how to install and setup everything Zowe related in order to connect to the MTM mainframe. Sorry for the long title, I need to make sure Google indexes this well, haha.
Heads up, if you mess up a lot during this process you will need to reset your password a lot of times. IBM’s tolerance on failed login attempts is very low which leads to a fast lock out. This is a good thing though! Click here to read how you can reset your password.
Installing Zowe CLI and its prerequisites
First all of we need to install Node.js, any version above 8 or the LTS version will do.
After installation, please verify that your Node.js is correctly installed by trying the following commands in your terminal or command prompt. Before doing this, close your existing terminals completely and re-open them. This will force them to reload the environment variables defined in your system.
Let’s ask IBM for access to Zowe
We need to talk to Zih. Who is Zih? He’s the guy you talk to when you have lost your password. Follow this guide to add Zih as a contact on Slack. Then you need to send him the following message:
Can you connect my id to zowe? Z50087
Be sure to change up your IBM ID. I have picked this off of YouTube, but I believe any sentence with Zowe and your ID in it will trigger the bot command. You could try ‘pls Zowe Z50087’.
Zowe CLI Package
After you have verified that your Node.js installation is correct, execute the following commands in your terminal.
npm install -g @zowe/[email protected] zowe plugins install @zowe/[email protected] zowe plugins install @zowe/[email protected] @zowe/[email protected] @zowe/[email protected] @zowe/[email protected] @zowe/[email protected]
The last command is optional, but I’m going for a complete installation.
Note, if you have an EACCESS error then you might need to give this a read. If you’re running a Linux distro then you might need to prepend sudo to your commands.
Configuring Zowe CLI
First of all we need to create a profile, we need to change up the following command:
zowe profiles create zosmf-profile myprofile123 --host host123 --port port123 --user ibmuser --password pass123 --ru false
After following the initial connectivity guide in the contest we can use those variables to create our profile. Be sure to use the latest connectivity guide as reference, I’m using the 2019 version. My command now looks like this:
zowe profiles create zosmf-profile mtm2019 --host 188.8.131.52 --port 10443 --user Z50087 --password pass123 --ru false
We can test our connection by executing a status check command. Don’t forget to change the profile name to yours.
zowe zosmf check status
Now I get to see the installed plug-ins. If the mtm2019 profile is not your default profile, then you’ll have to specify which profile you want to use in the command using –zosmf-profile ProfileName.
Delete a profile using the command zowe profiles delete zosmf profileName –force.
First install Visual Studio Code like you normally would install any other program. Yes, I am making my sentences longer than they need to be, this is a 1000 words assignment afterall. (JK).
Small note, I am using Visual Studio Code Portable from https://garethflowers.dev/vscode-portable/. This is so I can create custom VS Code instances for specific projects and langauges.
Look for the Zowe Explorer extension in the plug-in market. Install the extension.
Adding your connection to the plug-in
After installing the plug-in, a new menu item will appear. Click that menu item, then hover over data sets and you’ll see a plug sign. Click the plus sign and it will prompt you to create a new connection to z/OS.
- Profile name: mtm2019
- Host: https://184.108.40.206:10443
- Username: z50087 (your IBM id)
- Password: pass123 (your password)
- Reject unauthorized: false. It’s best you search for ‘false’ in the box to make sure you can’t select the wrong one.
After the connection is set, you will need to add the profiles to the different tabs.
Plug-in in action
In data sets I active my profile, in this case it’s zowemtm2019. Then I click on the loop to perform a search action. I’ll search for my own profile, z50087.
Observe the items highlighted in red. After my query I can see all my data sets and its members.
Yes yes, I bet you have noticed. I have messed up a million times creating the profiles, I literally have like a thousand profiles that don’t work because I barely knew what URL to enter. It also took me ages to notice my IBM z/OS was locked because of my failed login attempts haha. Ha. :'(
- View, rename, copy and filter mainframe data sets, USS files and jobs.
- Create download, edit, upload, and delete PDS and PDS members.
- Create Zowe CLI compatible zosmf profiles.
- Switch between Zowe CLI zosmf profiles to quickly target different mainframe systems.
- Submit jobs.
It also makes me feel young when using it.
First of all you might want some syntax highlighting.
- IBM Z Open Editor by IBM. For Enterprise COBOL, PL/I, and JCL.
- rexx-syntax-highlighting by Thomas Weber. For REXX ofcourse.
I finally did it, a Zowe post. Believe me, it was a hassle to make. I didn’t really find any clear guides on how to do it with the master the mainframe mainframe. Or maybe I missed it? Hmm…
Anyhow, how are you doing? Are you safe?