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!



























