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!

IBM MTM 2019: Part Three – Challenge #10

Hi people!

Thanks for all the help by the way! You guys are awesome! And again, I’m sorry to the commenters, I have about 40 comments, 8 e-mails and some PMs on Slack still waiting for help with their challenges.

I don’t have enough time to solve the challenges, write blogs and answer everything. I sincerely wish I could help everyone! I’ll do my best to answer the ones I can! I have noticed Akos and other users answering other readers, awesome!

As a non-student I have until the 9th of september 2020 to beat this challenge, but I’ll do my best to finish up to challenge 14 in time 🙂

PS: I have double checked for spelling errors this time (embarrassing)

IBM Z Assembler

IBM Master the Mainframe Part Three – Challenge #10

Copy assembler program source code

Let’s start by creating a new member asmhello in our SOURCE data set. Inthere I’ll copy ‘zos.mtm2019.public.p3.source(asmhello)’.

Submit JCL to compile assembler program source code

Let’s sub ; =sd ; st the code and check the output for ASMHELLO in the JES spool.

Identify reason assembler program compile was unsuccessful

Let me investigate the issue.

So I have noticed there is an issue with an undefined symbol.

Correct assember program source code error and re-compile

Let’s go back to our source code and locate the undefined symbol. Ok, I’ll try to help. A variable has been defined in the program body. The logic, in the program references, uses these variables. Something seems to be wrong with them.

I have highlighted the variables. Please take a good look and fix where needed.

I will submit the job, again using sub ; =sd ; st and check the output.

RC code is 0000! That means I have fixed the issue.

Execute successfully compiled assember program interactively

From the ISPF Primary Option Menu I’ll issue the primary command =6 to get to the command console. I’ll execute allocate dataset(*) file(recdd) shr and then call ‘z50087.load(asmhello)’. Substitute your ID 😉

Successfull execution writes two messages to the display. And there are two messages! Yaya!

Submit JCL job to execute successfully compiled assember program

Now let’s do the last step for this challenge. Issue the primary command tso submit ‘zos.public.jcl(p3ch10)’ to direct the output to P3.OUTPUT(#10). Pick any jobname as always.

This is challenge #10 done!

IBM MTM 2019: Part Three – Challenge #09

Hi people!

I’ve been away for a while and haven’t been able to check my blog for some time. I’ve noticed a ton of comment and e-mails but it takes me a lot of time to answer all. I’ll get back to all my users soon! I hope you have been doing fine! Please, if you want faster help visit https://mtmcompetition.slack.com/.

Java SQL

IBM Master the Mainframe Part Three – Challenge #09

Get JCL necessary to complete challenge

Like most of the challenges we need to copy some data to one of our data sets. We should be familiar with this process by now.
First I’ll create a new member db2java inside my JCL data set. Then in the edit session I’ll COPY ‘zos.public.jcl(db2java)’ into it.
Somewhere in this code we need to change the output member to P3.OUTPUT(#09). I’ll enter the primary command save to save my changes and then I’ll sub ; =sd ; st to run the JCL. sub is actually shorter syntax for submit. This is a TIP for the lazy 😉
This is my output. It is identical to last challenge’s output.

Modify, compile, and execute Java program

We need to go back and edit the Java it executes to select only employeenumber from ibmuser.vphone where phonenumber is 2167. We also need to output Employee Number: instead of Phone:.
I seriously already forgot where the java files are located, I’m horrible. Let me visit my old blogs and see how it did that haha.
AHA! TSO OEDIT primary command to get to the file explorer.
Then I’ll edit db2java.java. My hex view is still on, I’ll issue the hex off primary command to disable it.
Somewhere on this screen there is a SQL statement and an output statement. Find where and make the necessary changes. As a non native English-speaker, I was surprised I wrote necessary correctly from the first go. Small victory!

Incase you’re wondering, yes some text is longer than the text that was already there. You’ll need to move some thing around. Don’t forget about spaces and closing statements like “;” “)” etc.

I can’t give the solution as IBM has told me not to, please refrain from posting solutions directly. Looking at you Mig 😉

By the way, hi Georges!

Enter the primary command save to save your changes. Then go back to the JCL to check if everything executed correctly.
I have some results! I’m not sure if that’s correct though. I could check using some SQL… buuuuuuuut I don’t have enough time.