IBM MTM: Part Three – Challenge #12

We’re in for a short blogpost. I thought those were long gone. Today I’m taking a look at virtualisation with z/VM. Actually the z/OS we’ve been working on was a virtual machine controlled by a single LPAR (logical partition).

I’ve been wondering, there’s so much you can do with a mainframe, how on earth can a man learn everything? Do you get proficient in mainframes once you’re ready to retire?

IBM Z Mainframe Supports 5 Unique Operating Systems

IBM Master the Mainframe Part Three – Challenge #12

I have fiddled around with virtualisation quite a bit. I’ve worked with Virtualbox, VMWare workstation/player and VSphere. But this is probably a whole other level of virtualisation. I’m really curious.

IBM Z supports 5 unique operating systems:

  1. z/OS – flagship operating system used for this contest
  2. Linux – if you know Linux, you know Linux that runs on IBM Z
  3. z/VM – hypervisor operating system
  4. z/TPF – Transaction Processing Facility
  5. z/VSE – similar to z/OS with less features and functions

IBM Z supports 2 types of hypervisors:

  1. LPAR – Logical Partition, a type 1 hypervisor
  2. z/VM – z/Virtual Machine, a type 2 hypervisor

An IBM Z machine can run just about 85 different LPARS at the same time. Running 8,000+ operating systems within a single IBM Z frame with network delay between the operating systems near zero is industrial strength architecture. Impressive! If you’re interested you can request a trial for a Linux virtual machine at https://developer.ibm.com/linuxone/.

z/VM query command output in preparation for challenge

Let’s head to the ISPF Command shell using =6. Then enter the primary command q cplevel go get more information about the z/VM Operating system hosting the z/OS contest virtual machine.

Entering q n show the number of virtual machines currently active as guests of z/VM.

Hmm, so there are 56 virtual machines? Or 57 including the VSAM – VTAM one. Let’s check which network interface controller I’m using, by issuing q nic.

This is my information. What’s yours? Let me know in the comments below! I also need to issue q 400-402 to see information about device 400 to 402.

Missing text:
0402 OUT + 04 IOCNT = 01245891  ADP = 000 PROG = 000 UNAVAIL = 128
0402          BYTES = 00000000361094D2

I got the information I needed.

Gather z/OS system definitions used to communicate with z/VM hypervisor

Now I exit the ISPF Command Shell and check the vendor.tcpparms data set using dslist ‘vendor.tcpparms’. I need to select the member S0W1.

I need to delete all lines except the 3 lines with the NIC adapter name. So does that mean that I need to delete all lines that don’t have ‘DEVOSA1′ in it? I just did and only have 3 lines left, good.

To be honest, I have no idea how to work with label so I just copied after .zl. So now I’ve copied 99 lines into p3.output(#12) and I should be done.

So that’s it! P3.output(#12) now has 7 lines of z/OS definitions used to connect to z/VM.

Challenge #13 – What about it?

It’s been a very rough week, and challenge #13 is very long and complex so it’ll take much longer for me to complete this challenge and write a blogpost about it. Just a friendly heads-up 🙂

I’m also sad, I thought I was going to learn about virtualisation but to be fair… I’ve learning pretty much nothing from this challenge. What was the point of this? So I would know which NIC I had? No idea.

It was black friday recently, did you buy anything?

Share this:

IBM MTM: Part Three – Challenge #11

Challenge 11… we’re getting there. From now on all following challenges will be about learning a new programming or scripting language. I’ll be shown how to compile, execute and debug a program/script.

In this challenge I’ll be working with some C code. I’ve never written any C in my life, only C# but I doubt it’s the same. Well, I’ll see when I get to the code.

Run C Fun

IBM Master the Mainframe Part Three – Challenge #11

First I’ll continue to OMVS by using the primary command tso omvs then I’ll copy the C source code to my unix directory using cp “//’zos.mtm2018.public.source(cpgm)'” cpgm.c Now we’re able to compile the code using xlc -o cpgm cpgm.c. If it compiled successfully then I should be able to execture it the same way we execute a shell script inside Linux: ./cpgm

The C program counted from 1 to 10, writing each number to the display and wrote a message in Unix cpgm.output. I’ve checked the message and wrote it to //pds.data(cmsg1).

Now I need to modify the code. I need to change the text it outputs from My first C program on z/OS to Fail fast to succeed!. I’ll edit the file using the primary command oedit cpgm.c. 

I’ve highlighted the most interesting part of the code. Line 000021 is where the message needs to be changed. Line 000028 is where they display the code to write text to a DD name.

To clarify the code, my first guess is that they open the connection using the fopen function, then pass the DD parameter as DD:DDNAME and the second parameter w probably stands for write (to clarify the action they want to perform).

I know the comments at line 000026 and 000027 say comment/uncomment this to write to a Data Set but I’m not sure if I actually need to do it? I’m just going to assume we don’t need to as they don’t instruct us to do so in the assignment.

Now I’ll save using F3, compile and run using the previous commands. And lastly I’ll read the output and write it to pds.data(cmsg2).

That’s done! I’ll now copy the C executable module from my Unix file system to my MVS data set using cp cpgm ‘//load(cpgm)’. Now we’re ready to exit omvs. I’m told there are multiple ways to compile code. We can also compile C code using JCL.

  • CPGM is the program to be executed
  • STEPLIB DD tells the system where to search first for CPGM
    You copied CPGM from the Unix directory to your MVS LOAD data set
  • HANDLER DD is coded in the JCL

We’re going to submit the JCL using tso submit ‘zos.public.jcl(cpgmjcl)’ as we need the output to be inside P3.OUTPUT(#11). Is HANDLER here DD:HANDLER inside the C-code? It probably is.

The objective is to change the C program source code to write the text message to JCL HANDLER DD instead of cpgm.output

Oh schnitzel, I’ll go and do that. I kind of gave it away I think? Oh… they give it away too when I read a bit further. No harm done.

  • Locate C statement used to write text to cpgm.output
  • Locate C statement used to write text DD:HANDLER
  • Comment statement used to write text to cpgm.output
  • Uncomment statement used to write text DD:HANDLER
  • F3 to save and return to Unix shell prompt

Done! That’s it for challenge #11 🙂

Schedule?

I know… I try to release periodically but work and free time won’t allow me to. But I already prepared a lot of stuff for the coming two weeks. I want to devote the entirety of december to challenge #15!

Share this:

IBM MTM: Part Three – Challenge #10

This challenge is a lot more difficult, in two ways even. It’s difficult because there’s no guidance and it’s difficult to write a blog about it as I’m not allowed to publish solutions. This time we need to locate invalid packed decimal data and fix it.

I’ll need to execute a program called ICETOOL to display and verify packed decimals inside the ZOS.PUBLIC.BBRI.CLIENTS data set. A good help for this challenge is the JCL used in Challenge #03. This challenges asumes we are aware of what the JCL does in challenge #03. I think I was aware, not sure? Uhh…

We need to be aware that only VERIFY is needed to complete the assignment. DISPLAY is not needed. VERIFY produces a return code 12 as a result of finding invalid packed decimal. However, the invalid packed decimal records are written in JCL job output.

Identify every invalid packed decimal record found within 10,000 records

IBM Master the Mainframe Part Three – Challenge #10

Well it’s pretty obvious that we’ll be using the same JCL as challenge #03 so I guess I can show you that much. I’ll just copy Z30163.JCL(SORT003) into a new file. I guess it doesn’t matter what I call the file. I’ll just navigate back to dslist and create SORT010 and just edit it from there.

So I already went ahead and changed the SETVAR to the data set we need and also deleted the DISPLAY statement as we don’t need that. Now what do I need to change? Let’s take a look at the data set.

I’ve put hex on for no reason at all. Seriously. So here we see that a row is 11 characters long. That might give you an idea on what we need to change in SORT010. I’ve changed what I needed to change but the records are written in the JCL job output.

I tried copying sort004 and write the output that way but I kept getting the error 11 BYTE RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR BAD. But when you think a little bit, IBM never said to use sort004 didn’t they? And the report is inside the JCL. So why not just XDC it?

I don’t think that just simply using XDC is enough? I am confusion.

Well I guess that just using XDC is enough. Weird.

Easy, but not easy.

I don’t really know what to think about this challenge. It just had me copy some old JCL, edit three things and copy the output using XDC. I’m not really sure if this solution is correct. I guess I’ll see later 🙂

What’s been easy but not easy for you this week?

PS: Did you notice? I published this post at 11/11/2018 11:11. Coolio!

Share this: