Category

Zowe

How to Add a UserID to z/OS Using a Zowe Script!

By | Blog, Zowe, Zowe Development Updates

Written by Daniel Jast, member of OMP’s Zowe community and zSystems Technical Specialist at IBM Worldwide Client Experience Centers

Here in Poughkeepsie at the Client Experience Center, our Z team is constantly looking for opportunities to modernize, by using new tools and technologies coming available on the platform. I am always looking for ways to leverage the Zowe platform to better manage the Z Infrastructure I supports. I provide many technical demos for Zowe, where we show off plenty of “Out of the box” functionality, as well as some extensions and scripts used in the  Zowe environment. I previously worked with my internal team and others on creating a common process to plug Jupyter Notebook web applications into the Zowe Desktop.

My team and I have now moved onto some scripting use cases, to better manage and automate tasks across their systems. One task that a Systems Programmer is required to do on a regular basis, is create UserIDs on a system, so a user can log on and get access to z/OS. Not only is this a repetitive task, but one has to know all the different system specific information, depending on which system the UserID is being added to. With help from my colleague Alex Lieberman, we created a base script for Systems Programmers to start adding z/OS UserIDs to systems. You can download and customize this script to fit your environment and can find the Github repository where this code is stored here.

 

Prerequisites: What you need set up

There are some things we are going to need to have set up on our z/OS System and on our local workstation before this script will run successfully. This section describes what to do prior to running the script. This script is written in bash, so you will need to have bash installed on your workstation.

Creating Zowe CLI Profiles

There are 3 Zowe CLI profiles needed for each system you are accessing. These 3 profiles are a z/OSMF profile, a SSH profile, and a TSO profile. To create the 3 profiles, you can use the following command syntax:

z/OSMF Profile:
zowe profiles create zosmf SYSNAME –host IPAddress –user ibmuser –pass myp4ss –reject-unauthorized false –overwrite

  • The z/OSMF Profile is used for the dataset and job API commands. These commands allow us to upload our JCL to the z/OS System, and then submit those datasets as jobs.

SSH Profile:

zowe profiles create ssh SYSNAME –host sshhost –user ibmuser –password myp4ss

  • The SSH Profile is used to issue Unix commands. We issue commands against the UserID’s home unix directory to change ownership and permissions.

TSO Profile:
zowe profiles create tso SYSNAME –account ACCOUNTnumber

  • The TSO Profile is used to issue TSO commands. We issue LISTUSER commands to verify our script is creating what we want.

Wherever you see SYSNAME in the profile creation commands, you should replace that with the name of the system(LPAR) that you are creating that profile to connect to. It is a good practice to name your profiles after the system you are connecting them too, so it is easy to differentiate between profiles.

Allocate a PDS to Store the Jobs

When looking at the script, you will notice that there are 6 different jobs that are uploaded to our z/OS and then ran. When our JCL is uploaded to z/OS, we need to put it somewhere before we run it. Therefore, allocate a JCL library where these jobs can be stored. You then need to change this value in 2 different places throughout the script.

First change the target JCL Library where you want these jobs to be stored when they are uploaded to z/OS:

zowe zos-files upload stdin-to-data-set “DANJAST.JCL(ZWEUSERX)”

Second, where the job is being stored when submitting the job:

jobid1=`zowe jobs submit data-set “DANJAST.JCL(ZWEUSER1)” –rff jobid –rft string`

Add REXX to Your System

If your organization uses SMS to manage where a UserID’s datasets should be directed, you will need a program to go into your ACS.SOURCE(STORCLAS) member to add the new UserID. Alex Lieberman has written a basic REXX script which goes into the STORCLAS member and adds a new line for the new user being added. The REXX to do so has been uploaded to the Github repo here. This REXX needs to be added to your z/OS System prior to script execution. You also need to point JOB 1 at the dataset you created for the REXX.

Change the following line of JCL in JOB 1 to point to your REXX location:

EX ‘SYSL.REXX(INACSSRC)’ ‘${username},${description}’

NOTE: You may need to edit the REXX script to fit your organization’s STORCLAS member.

Script Part 1: Set Variables
Scripting with the Zowe CLI commands is easy. Dan is a programmer with few years of experience and recognizes an opportunity for automation, which is why he writes simple bash scripts to automate z/OS tasks. The first thing we are going to want to do in any script we write leveraging Zowe CLI commands, is to set our variables. In this use case, we need to get the UserID the Systems Programmer wants to add to the z/OS System using the following code:

echo ‘What is the UserID you would like to add to z/OS? This must be less than 8 characters long.’

read username

echo The username you are creating is: $username

This takes in the user’s input for what the username will be, and loads that into the $username variable. Now throughout the rest of our script, $username will be replaced with what the user specified. This can be within Zowe commands, as well as within JCL in the script. Some of the other variables we are going to want users to specify at the beginning of the script include:
$system = What z/OS system we are adding this new UserID too

$description = Why are you adding this userid to your system? (Documentation/management purposes)

In setting the $system variable, we need to add some logic to allow for the user to specify which system is their intended target system to add the UserID too. Customize this this script to fit the environments you would like to exploit.

Script Part 2: Edit Script JCL

Throughout the script, there are 6 different jobs we are going to submit. These jobs, in their current state, have JCL that is in the syntax which the Poughkeepsie Client Experience Center uses for their JCL. Your organization may customize your JCL differently, therefore you will need to review all JCL in the script. As good practice, you can manually load these jobs into datasets and add a user. This way, you can ensure the jobs function the way you intend, and then any changes you make to the JCL you can put in your script. The purpose for the 6 different jobs submitted are as follows:

  1. JOB1: Submit a REXX program that edits the ACS.SOURCE(STORCLAS) member to add SMS logic for UserIDs
  2. JOB2: Create RACF Permissions / Work for new userid
  3. JOB3: Create the ALIAS for the UserID on the system. This is a CATALOG entry to allow dataset creation for the HLQ of the UserID
  4. JOB4: The ISPPROF dataset is needed by ISPF for each userid when using ISPF. When they logon, the logon proc will need this dataset to be active before they can successfully access ISPF.
  5. JOB5: To access OMVS (USS), the userid on PEL systems will attempt an auto-mount of a ZFS file in naming convention: ZFS.USER.<userid>.  So, when the user enters TSO ISH or TSO OMVS, auto-mount will attempt a mount with the following specifications:   mount point /u/<userid>  mounted to file OMVS.ZFS.USER.<userid>. The ZFS file is needed.  Create the ZFS file with the following batch job.  Be careful to ensure that words “aggregate” and “compat” are lower-case.
  6. JOB6: Add OMVS segment for userid. Remember the UID we got from TSO ISH?….. It was 209.  This is where that comes in to play.  We need to add an OMVS segment to the userid.  OMVS segment requires the UID.  Be careful to check the GID (group ID) with TSO ISH.  Be careful that the syntax is case-sensitive!

To access the script, please visit the following repo: https://github.com/dan-jast/zowe-cli-sample-scripts/blob/master/shell/AddUserSAMPLE.sh

Good luck scripting with the Zowe CLI! If you create complex scripts on your own to automate z/OS tasks, consider contributing those scripts back to the open source community so others can use them!

We’d love to hear about what you’re doing. Join the Zowe channels on the Open Mainframe Project Slack today!

Zowe is now available on IBM Z Trial!

By | Blog, Zowe, Zowe Development Updates

by Pluto Zhang, Zowe community member and IBM developer

This blog post originally ran on the IBM Developer blog earlier today.   

Zowe™, a project of the Open Mainframe Project™, is now available on IBM Z Trial. You can get your hands on a Zowe trial on demand at no charge. This trial environment is a fully configured z/OS environment with Zowe preinstalled and set up along with a set of integrated hands-on tutorials. You can start your Zowe trial experience within hours of completing a simple registration to be assigned with a trial system for 3 days.

Figure 1. zTrial wizard for Zowe

Figure 1. zTrial wizard for Zowe

Register and try it out

Explore the project first

In this Zowe trial, you can experience cloud-like modern interfaces that Zowe provides for interacting and working with z/OS. You will also learn how to create and extend Zowe using sample plug-ins and extensions. This trial environment includes a sample Node.js API, a sample web application plug-in, as well as a sample Zowe Command Line Interface (CLI) extension along with all required resources and files.

The trial offers a set of basic scenarios with easy-to-follow instructions that explain how to complete the following tasks. Each scenario takes about 15-20 minutes.

  • Get started with Zowe, including Zowe Desktop and Zowe CLI
  • Extend Zowe with new APIs
  • Extend Zowe Desktop with new web application
  • Extend Zowe CLI with new CLI commands

New to Zowe? No problem! You can get to know the modern Zowe interfaces through several simple tasks in the “Getting started with Zowe” scenario.

Figure 2. Getting started with Zowe scenario

Figure 2. Getting started with Zowe scenario

Already familiar with Zowe? You can learn how to extend Zowe by creating your own APIs and applications by following the step-by-step instructions provided.

Figure 3. Extending Zowe API scenario

Figure 3. Extending Zowe API scenario

Figure 4. Extending Zowe Application Framework scenario

Figure 4. Extending Zowe Application Framework scenario

Figure 5. Extending Zowe CLI scenario

Figure 5. Extending Zowe CLI scenario

We hope you find this trial program informative in getting started with Zowe as you kick-start your journey toward becoming a developer, extender, and/or contributor to this new open source project on z/OS.

Register and try it now!

To learn more about the Open Mainframe Project, click here. To learn more about Zowe, click here.

Zowe™, the Zowe™ logo, and the Open Mainframe Project™ are trademarks of The Linux® Foundation. Linux is a registered trademark of Linus Torvalds.

Zowe Jupyter App: A Big Hit at the Poughkeepsie zModernization Summit Event

By | Blog, Zowe

Guest blog from Daniel Jast – IBM Z Systems Technical Specialist

The Poughkeepsie Client Experience Center recently hosted the annual IBM Z Summit Program Technical training event titled, zModernization Summit Event. At the training event, we provided 20 of the new IBM Technical Sellers in Z with hands on training in some of the “modernizing” applications on Z. These technologies included CICS, DB2, z/OS Connect, z/OSMF Zowe, Spark, ICP, Docker and more. The week let participants take a cobol application running on z/OS, expose the applications services into APIs, and then create a containerized application with those APIs which was then deployed out to the IBM Cloud. The application that was being run was a stock trading application which allowed users to create an investment portfolio, add stocks to the portfolio, and so on. We then let users get a hands-on experience on the Zowe Desktop and CLI, seeing how easy and simple completing complex z/OS tasks can be for new users by utilizing Zowe.

On the Zowe Desktop, we had created an IFrame application that had the Jupyter Notebooks running right on the Zowe Desktop. Jupyter Notebooks are used to exploit Spark to analyze data sources of your choosing. We had the Jupyter Notebooks analyzing Investment portfolio data which the users had created unknowingly as they worked through the technical labs throughout the week of training.

Training participants thoroughly enjoyed the Zowe and Jupyter Notebook piece. After getting previous training on “green screen” interfaces to z/OS, the Zowe Desktop and Zowe CLI were very well received. The audience was majority straight out of college, matching the target audience for the Zowe platform. When participants were asked what their highlights and key takeaways from the week of training were, some mentioned Zowe explicitly:

 

“Being able to learn more about Zowe and more innovative technologies integrated with Z.”

 

“Highlight: Zowe presentation!”

 

“My favorite (presentation) was the Zowe presentation”

 

“I think I really enjoyed learning about Zowe, and the hands on lab are super helpful in understanding!”

 

If you are looking to add Jupyter Notebooks to your Zowe Desktop, you can follow the github documentation posted here: https://github.com/zowe/jupyter-app

 

You can also follow the custom documentation written by the Client Experience Center’s Alex Lieberman(Alex.Lieberman1@ibm.com) and Dan Jast here: https://ibm.box.com/s/wo583vfw4klc2jg7l0zxo0k55yvw681b

 

If you would like to go through most of the Zowe Hands on Lab which event participants went through, you can request a demo from the Client Experience Center Demo Portal located here:

 

 

NOTE: If you are not an IBMer, you will not be able to participate in this demonstration without your IBM representatives help. You can contact Dan Jast (daniel.jast@ibm.com) for further information.

Dalian University of Technology Expects to Deliver New Zowe Tools

By | Blog, Zowe

Guest blog from Kun LU, Ph.D., Associate Professor, Director of Innovation Practice Center, School of Software Technology – Dalian University of Technology – China

When it comes to the Best DevOps Open Source Project, do you think it has anything to do with the IBM mainframe? Well, it does.  Open Mainframe Project’s Zowe, the first open source project based on z/OS, was named as a one of the finalists for the “Best DevOps Open Source Project” category by Devops.com.  Zowe is an open source software framework that provides solutions that allow development and operations teams to securely, manage, control, script and develop on the Mainframe like any other cloud platform. Leveraging the Zowe framework, we (DLUT) plan to develop and contribute a few tools to Zowe to help developers be more efficient, productive and agile in their daily work on z/OS.

We will work closely with IBM CSL CICS team and expect to deliver the following tools as Zowe plugins for CICS customers, first for the China market, in 3Q/4Q this year.

CICS Statistics Visualizer plugin

In the past, CICS health status check needs to be done manually by CICS experts who have profound CICS skills and experience.  The workflow includes understanding the system design, configuring CICS statistics programs and collecting CICS statistics data from CICS sample region at service peak time by uploading statistics data and analyzing the data, and finally generating reports and diagrams.  With CICS Statistics Visualizer plugin on Zowe Web UI, all the work can be done automatically.  The plugin also supports statistics data comparison of a single region at different time intervals, which can largely simplify the work the customer used to do before to monitor and analyze the system, like CICS health status change after CICS upgrade or configuration change, the trend of system resource utilization over time etc.  Furthermore, key CICS health indicators can also be queried by a simple shell command line through Zowe Command Line Interface (CLI).

CICS Liberty Debugging Assistant plugin

In the past, the customer needs to collect and store a list of debugging information from different storages and locations to troubleshoot a CICS Liberty problem.  This includes CICS Job log from mainframe JES, JVM profile and Liberty configuration files, STDERR/STDOUT/JVMTRACE files and Liberty output files like messages.log, trace.log and ffdc from zFS, MVS system dump accompanying with JAVADUMP, SYSDUMP and CEEDUMP dumps depending on the problem.  In addition, CICS trace level needs to be configured and Interactive Problem Control System (IPCS) must be used to format the unformatted dumps.  With CICS Liberty Debugging Assistant plugin, all the debugging related configuration, debugging information collection and dump formatting can be done conveniently by one-click operation.

CICS Application CI/CD plugin

Nowadays, CI/CD is widely used in software development.  More and more customers have increased demand on the z/OS development CI/CD to modernize the mainframe development, integrate with the distributed platform development, and assist the full stack developer to work with the mainframe services.  Zowe acts a good platform to eliminate the operation gaps to enable the z/OS development CI/CD, which provides some plugins like CICS and DB2 plugins to help simplify the application development.  As Git is widely being used for the distributed development, to centralize the code management, Zowe plugins (or cli) can be built for mainframe DevOps, like:

  • Trigger the build automation and end to end test automation (e.g. online COBOL or batch COBOL)
  • Trigger the env update when there is a CICS or DB2 configuration update
  • Deploy update into the multiple environments

IBM Systems Magazine | Getting to Know the Open-Source Zowe Project

By | News, Zowe

Zowe—the first open-source framework for z/OS—is poised to break new ground for IBM Z clients. Announced on Tuesday, Aug. 14, at SHARE in St. Louis, by executives from IBM, CA Technologies, Rocket Software and the Open Mainframe Project, the open-source project promises to be a game changer.

“Open source redefines industries across the board. We’ve seen it solve problems and lead to innovative solutions. Open source changed the automotive industry and the cloud changed networking, too,” says John Mertic, director of program management for The Linux Foundation and director for the Open Mainframe Project. “We’re excited to see what Zowe and open source will do for the mainframe industry.”

Read more at IBM Systems Magazine.

Clabby Analytics | A Different View: The Zowe Initiative and the “Open Mainframe”

By | News, Zowe

At this year’s Open Source Summit IBM, CA Technologies and Rocket Software announced an open-source software framework known as “Zowe” – a framework designed to draw new application development to the z/OS operating environment, as well as making it simpler to integrate modern applications on other platforms (systems, servers, mobile devices, etc.) with mainframe servers. We at Clabby Analytics, however, see this move as a heck of a lot more than application development and integration – we consider it a major step forward in opening up the mainframe and making it a transparent member of any enterprise hybrid cloud environment.

Read more at Clabby Analytics.

Open Mainframe Project Announces Open Source Framework for Modernization | Database Trends and Applications

By | I Am A Mainframer, Zowe

The Open Mainframe Project has announced Zowe, an open source software framework that bridges the divide between modern applications and the mainframe, intended to provide easier interoperability and scalability among products and solutions from multiple vendors. Zowe is the first open source project based on z/OS.

Read more at Database Trends and Applications.

IT Toolbox | More About Zowe

By | News, Zowe

IBM has been a big supporter of Linux for many years and is a keen supporter of the project because it gives a younger generation of programmers access to the mainframe and all the power and security available on that platform. Also involved are CA Technologies and Rocket Software.

Zowe has four components. These are: Zowe APIs, Zowe API Mediation Layer, Zowe Web UI, and Zowe Command Line Interface (CLI).

Read more at IT Toolbox.

TechZone360 | From Mainframe to Open Frameworks, Linux Foundation Fuels Up with Rocket Software

By | News, Zowe

Last week, at the Open Source Summit, hosted by The Linux Foundation, the Open Mainframe Project gave birth to Zowe, introduced a new open source software framework “that bridges the divide between modern applications and the mainframe, providing easier interoperability and scalability among products and solutions from multiple vendors,” according to the announcement.

Read more at TechZone360.