IBM MTM 2019: Part Three – Challenge #07

Bonjour, another another Java challenge!

I’m reading the intro and they say: Remember what you learned about hexadecimal values. You will need it. *Gulp* I hope I remembered at least something.

More Java using JZOS Toolkit

IBM Master the Mainframe Part Three – Challenge #07

Use Java program to replace old string of text with a new string of text

Okay, let’s go back the the zjava.java file the same way we did in the last challenge. tso oedit from the ISPF menu and line command e next to the file name. Issue the primary command hex on so we can identify the issue with “Who said this “.

Now we need to go back to the ISPF menu. Enter =6 and issue the primary command  obrowse ‘/z/public’.

Let me view it.

Hmm, there’s a difference alright! I see them, do you?

Fix it!

Are there any differences? Fix the JAVA code. How do you fix it? Go back to the java file, put hex on and overtype the hex with the correct values as seen in SOURCE.

Get new copy of JCL to compile and execute modified Java source code

We won’t execute the Java code again. Instead we’ll grab JCL to execute it. Let’s go to our jcl data set by using the primary command dslist jcl and we’ll make a new member called zjava using the primary command s zjava.

Inthere we’ll copy ‘zos.public.jcl(zjava)’.

We need to change the last //STDOUT to have it write to P3.OUTPUT(#07).

If you’re finished, execute using submit ; =sd ; st and go check P3.OUTPUT to see if you have the correct output. Let me see for myself…

There he is! Dear mister Einstein! Great man!

Last task to get full credit

We need to edit our P3.OUTPUT(#07) and copy our Java code into it. Let’s do that.

Don’t forget the a label as line command. Otherwise you’ll have copy pending!

This is my eventual output, minus the censoring ofcourse!

5 thoughts on “IBM MTM 2019: Part Three – Challenge #07

  1. I’ve seen where this happens, getting junk in data from an outside source, so not an entirely contrived example.
    The Challenge does seem to be going faster than last year’s. Less SORT/VSM and Rexx for sure.

  2. I like the way you hide some parts now! It’s much more clear for me to understand the activities in your blog, and a bit challenging as we don’t see the answer right way. Thank you!

  3. Hi Kevin,
    Good solution!
    But from my point of vue is not realistic, because normally you have a text with regular characters, then the only thing to do is to replace the sentence as is: “Who said this” with no other characters.
    Anyway I think your answer is the one expected!
    Georges

    1. Hi Georges

      Yes indeed, I don’t believe something like this will be seen in the work field. But I guess it’s a nice way of showing that something like this could happen.

      Do you also have the feeling that these part 3 challenges are shorter than last years’ challenges? Or do we just solve them quicker?

      Kind regards,
      -Kevin

      1. Hi Kevin,
        Yes I agree, with that the people know better how the data are constructed 😉
        Yes again, I think is a question of better understanding how they intended to teach. Anyway it seems quite different, something more modern (remember the videos of the beginning), with an air of zowe in mind, and less COBOL, and less REXX, don’t you?

        But I still like the challenge! And who knows, maybe a work on this area?

        Kind regards
        Georges

Leave a Reply

Your email address will not be published. Name, email and website not required.