IBM MTM 2019: Part Three – Challenge #13

Hello!

Let’s get our hands dirty and modify some REXX code! This time we’re looking at some system variables and we’ll print them to a data set member!

PS: I’m not sure if I will make the student’s deadline this year. The learning system deadline is the 9th of september 2020 or something. But I’ll try my best!

Advanced REXX Programming Interface – field names and values from SYS

IBM Master the Mainframe Part Three – Challenge #13

Explore SDSF real time system information

I’ll leave this part up to you 😉

Copy, review, and execute REXX code that gathers system information

In my REXX data set I’ll create a new member called zperf. I assume that stands for IBM Z Performance? In edit mode I’ll copy ‘zos.mtm2019.public.rexx(zperf)’ into it. I’ll also enter the primary command hilite rexx to have some syntax highlighting in the editor.

Now I’ll return to the data set member overview and issue the line command ex next to the zperf member to execute the REXX.

It should write a message to our P3.OUTPUT(#13) data set member.

It did. Nice!

Modify REXX code and observe differences

We need to do the following:

  1. Comment lines 9, 10, and 11
  2. Uncomment lines 13, 14, 15, and 16
  3. Uncomment line 36 – Comment line 36 line before creating final report
  4. Save and execute to observe differences

No weird stuff, we need to remember to comment line 36 before creating the final report. I hope the indentation at line 36 is still ok. So, I’ll go back and ex the zperf member again and check the output.

Wooh, a lot of red text. My P3.OUTPUT(#13) has not changed though.

I’ll keep a list of the variables here so I can use them in the code later.

Column SYSNAME.1 has the value: S0W1
Column TOKEN.1 has the value: 4TwSNj...bCmGHGw
Column SYSLEVEL.1 has the value: z/OS 02.03.00 HBB77B0
Column CPUPR.1 has the value: 54
Column SIO.1 has the value: 650
Column AUXPCT.1 has the value: 0
Column CSAPCT.1 has the value: 6
Column SQAPCT.1 has the value: 30
Column ECSAPCT.1 has the value: 13
Column ESQAPCT.1 has the value: 71
Column UIC.1 has the value: 65535
Column SPOOLPCT.1 has the value: 22
Column CADSPCT.1 has the value: 48
Column PAGERATE.1 has the value: 0
Column REAL.1 has the value: 2016727
Column REALAFC.1 has the value: 911297
Column REALAFCB.1 has the value: 2479
Column FIXPCT.1 has the value: 4
Column FIXBPCT.1 has the value: 1
Column MAXASID.1 has the value: 2495
Column FREEASID.1 has the value: 2315
Column BADASID.1 has the value: 0
Column STCNUM.1 has the value: 83
Column TSUNUM.1 has the value: 59
Column JOBNUM.1 has the value: 0
Column WTORNUM.1 has the value: 3
Column SYSPLEX.1 has the value: SVSCPLEX
Column LPAR.1 has the value:
Column VMUSER.1 has the value: DGBGMDU
Column JESNAME.1 has the value: JES2
Column JESNODE.1 has the value: SVSCJES2
Column SMF.1 has the value: S0W1
Column IPLVOL.1 has the value: VIMVSB
Column IPLUNIT.1 has the value: 1000
Column IPLDATE.1 has the value: 2019.342 13:24:10
Column IPLTYPE.1 has the value: COLD
Column IPLDAYS.1 has the value: 4
Column LOADPARM.1 has the value: 0CE3W1M1
Column CVTVERID.1 has the value:
Column LOADDSN.1 has the value: SYS1.IPLPARM
Column LOADUNIT.1 has the value: 0CE3
Column IEASYS.1 has the value: (00,LV,SV,VN)
Column IEASYM.1 has the value: (W1,SV,VN)
Column GRS.1 has the value: RING
Column HWNAME.1 has the value: VM-TOKEN
Column CPC.1 has the value: 003906.M04.IBM.02.0000000F1DF7
Column MSU.1 has the value: 10012
Column SYSMSU.1 has the value: 236
Column AVGMSU.1 has the value: 5
Column CPUNUM.1 has the value: 2
Column ZAAPNUM.1 has the value: 0
Column ZIIPNUM.1 has the value: 0
Column OSCONFIG.1 has the value: MVS
Column EDT.1 has the value: 00
Column NUCLST.1 has the value: SV
Column IEANUC.1 has the value: 01
Column IODFDSN.1 has the value: SYS1.IODF00
Column IODFDATE.1 has the value: 2017.177 14:56:10
Column CATDSN.1 has the value: MASTERV.CATALOG
Column CATVOL.1 has the value: VPMVSB
Column MLA.1 has the value: 1
Column CATTYPE.1 has the value: ICF
Column NETID.1 has the value: USASDV02
Column SSCP.1 has the value: USASDV02.MVR23GA
Column STATDATE.1 has the value: 2019.346 12:18:00
Column IPLCUNIT.1 has the value: 1000
Column IODFUNIT.1 has the value: 0CE3
Column IODFCUNIT.1 has the value: 0CE3

Modify REXX code to produce customize performance report

So the “Description of the challenge ZPERF REXX code” paragraph by IBM tell us what every function does in this REXX script.

We need to include the following information in our report:

  1. CPU percent busy for the system
  2. High unreferenced interval count
  3. Real storage available frame count
  4. Number of active started tasks
  5. Number of active TSO users
  6. Number of active batch jobs

And you probably guessed it, I’m doing the bare minimum! Note to my future employers, this is not my work attitude 😉

We know the following: “The information above is available from the SDSF SYS column fields.”. Now then, let’s just figure out how we echo each piece and finish this challenge.

So when we get to the variable name we want we need to execute a write function. Easy. I’ll figure out the 6 variables we need and then create 6 copies of the write_variablename function. Not the way I like to write it, but hey, bare minimum. For example, if I need MSU i’ll change then nop to then call write_msu and create a function called write_msu. Don’t forget you can search the text using the primary command f <query>.

How will I find out these variables? Easy! Google! I search for “High unreferenced interval count mainframe” and I can find an exact match on https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.isfa600/isfa600ug_isfjvsys.htm showing the variable title. This page actually has all of them.

My output looks good! On to challenge 14!

IBM MTM 2019: Part Three – Challenge #12

There’s a system problem! One of our system elements EZAFTPCU has encountered an issue! Let’s quickly get to our terminal and fix it!

System Programmer and SMP/E

IBM Master the Mainframe Part Three – Challenge #12

Retrieve z/OS module maintenance information using SMP/E panels

TIP: take note of all the names!

From the ISPF Primary Option Menu enter the primary command SM to display the SMP/E Dialog Panels. I’ll press F3 too to skip the tutorial. We don’t have time for this, our client is getting angery and my boss is pointing the 99.99% uptime agreement at me.

I’ll tab to the SMPCSI DATA SET and type ‘MVS.GLOBAL.CSI’. After that I’ll tab back to the cop command input and enter as query.

Here we go, I’ll press enter and then enter 1 as CSI Query.

Next up we know that EZAFTPCU is the ENTRY NAME and MVST is the ZONE NAME.

I’ll tab to the left of the MOD entry type and enter line command s to select it.

Now I get to see the following. I’ll try and remember the RMID and LMOD names because I need those to complete the challenge.

I’ll press F3 twice to return to the CSI Query panel. Now I need to do the same process but for different zoen names and entry types. The first one has MVST as zone name, SYSMOD as entry type and RMID, which we remember from before, as the entry type.

I get to see the following.

The SYSMOD type is PTF and maintenance happened on this element. Now let’s tap F3 twice again and query MVST as zone name, LMOD as entry type and we need to enter the LMOD name, which we remember from last time,  in the entry name field.

Now I get to see the following. We need to remember the SYSLIB name which I conveniently censored 😉

Yes I have removed a piece. I am required to.

Submit JCL to execute SMP/E utility program

I’ll create a new member SMP in my JCL data set. Inthere I’ll copy ‘zos.mtm2019.public.jcl(smp)’. Strange! I already had an SMP member in my JCL data set.

It looks like the one I need, I’ll keep it! Free stuff!

  1. Replace AAAA with the target zone name
  2. Replace BBBBBBBB with the MOD name
  3. Replace CCCCCCCC with the LMOD name
  4. Replace DDDDDDDD with the RMID or SYSMOD PTF unique number
  5. Replace EEEEEEEE with the SYSLIB system library data set identifier

Honestly, MOD name is a bit unclear to me.

What you know is the problem situation implicated a named MOD.

Nevermind, got it.

Now then, I’ll submit ; =sd ; st and the challenge should be done. Let me check my output.

Censored and done! Let’s continue!

Do you like censorship?

I personally do not. Be it the picture above or the internet.

IBM MTM 2019: Part Three – Challenge #11

Hellow!

Today we’re doing some more ASM. I personally don’t really like these challenges, but at least it’s nice to get in touch with the language. Last year IBM said they would work with ZOWE. Why did they cancel it?

Ah well, let’s continue.

Warning: you need to echo High level languages hide complexity of assembler instead of High level languages hide complexity of system assembler. Without the word “system”. This is an error on the challenge page! Thanks Viktor!

Z Assembler Mnemonic Instructions and Macros

IBM Master the Mainframe Part Three – Challenge #11

Assembler program modification

So after reviewing the code we need to modify the member asmhello of our data set source to write another message: “High level languages hide complexity of assembler“. Hiding the solution for this challenge will be hard, but I’ll do my best to make things as clear as possible.

Take a closer look at how they define the program body. They always have a pair of MVC and PUT. This for both variables and both echos. Make a new one, I have called it CHMSG. It stands for chapter message. Pick something else please 😉

The echos in the references part always start with the variable nameDCCL80′message’ and then it’s done. If the text string “High level languages hide complexity of assembler” does not fit, shift the screen more to the right and complete the sentence.

Submit JCL to compile assembler program source code

submit ; =sd ; st the JCL and jump back to the ISPF Primary Option Menu. From there I navigate to the console using =6 and execute two commands.

  1. allocate dataset(*) file(recdd) shr
    Assembler program writes to RECDD file name
    The above allocates RECDD file name to the display, *
  2. call ‘z#####.load(asmhello)’ – substitute your ID for z######

Successfull execution writes three messages to the display

And yes I have that!

Submit JCL job to execute successfully compiled assember program

From the ISPF Primary Option Menu I execute tso submit ‘zos.public.jcl(p3ch11)’ and I chose the job character ‘a’.

Output

There we go! I had some trouble with this challenge and never found the real reason. Suddenly my message displayed, weird! But hey! I’m not complaining, up to challenge 12!