Okay, another Java challenge! I like that, more coding problems! I have those daily at my j… No I don’t… heheh (awkward smile).
JZOS Toolkit API for Java
IBM Master the Mainframe Part Three – Challenge #06
Copy Java source to your Unix directory
View the Java source in your Unix subdirectory
From the same screen we enter oedit.
We now see a file explorer that looks like it was built in one of the matrix movies. We need to edit zjava.java, we can do so by entering the line command e next to the file name.
Press enter. You might have to press it twice as another screen pops up. Ignore that one.
I now get to see the file, IBM explains what the code does. We also see that scary warning. But I’m not scared, are you?
Submit JCL to compile and execute Java source program
Let’s run… not away, but the script. Let’s enter tso sub ‘zos.public.jcl(zjava)’ ; =sd ;st as primary command and try to identify the error.
If you can’t see your jobs, try entering prefix * ; owner z#####; as primary command. Thank you Georges! Enter line command v next to STDERR and let’s see..
It looks like there’s an undefined variable? Let’s fix that!
Identify and correct Java compile error
Let’s go back to the ISPF Primary Option Menu and enter the primary command tso oedit. Let’s edit zjava.java and correct the syntax error.
THINK WELL, IBM SAYS: “What was the name of integer value declared early in the Java program?”; You can use the primary command f int to highlight the text ‘int’. That should help!
If you think you’ve fixed it, enter the primary command tso sub ‘zos.public.jcl(zjava)’ ; =sd ; st and check the output to see if the error is gone. If it’s gone, congratulations!
Verify the completion of challenge #06
I have this output in my P3.OUTPUT data set. This means I got it right! On to challenge #07!
6 thoughts on “IBM MTM 2019: Part Three – Challenge #06”
When I hit two submit the file it says jobname cannot be more than 8 characters.
Do you need to enter jobname characters anywhere? Did you enter more than 8 characters?
Yes, I only have to switch line
redacted by Kevin.
You are right, but please don’t post solution directly.
I have the same result, but for me is not exactly the right one, because in the zjava.java there is a line with a replace instruction the text “Who said this” with “Albert Einstein”.
In the instructions: …Line 13 replaces Who said this with Albert Einstein… ???
I have asked this in slack too!!
And thx for mentioning myself!
I just found the solution, the issue will be resolved in challenge 7 !!!
Someone had to say this!