Home

ONLINE SESSION A - Revised 1-19-2019

Introduction to running JAVA  programs on the IBM Mainframe

I will grade your work on the mainframe - you do not email any work for this assignment

  

PART 1 - Batch JAVA


Objective: Compile and execute a JAVA program in MVS batch mode using JCL.


FIRST:


Type HILITE AUTO on the command line. The HILITE command allows the ISPF editor to color-code data based on context when you are Editing or Viewing a member.

 
Go to ISPF edit and navigate to YOURUSERID.JAVAJCL(JAVABTCH) and take a look at the JCL. Change the jobname to JAVAS0##, where ##  are the last two digits of your ID.


Change all other instances of unts0## to match your user ID,
making sure your userid is typed in lowercase if shown in lowercase and uppercase if shown in uppercase.


As before in JCL, type "SUB" on the command line to submit it.


Look at your output in the: YOURUSERID .JAVAOUT(PERSNOUT) member to see if it ran successfully, if not fix your typos and rerun it.


SECOND:


Go to ISPF edit and navigate to YOURUSERID.JAVAPGM(PERSONAL) and take a look at the java source code.

Type your name where it currently says SUPER STUDENT.

 

[FYI :YOURUSERID.JAVAIN(PERSNIN)  contains other input data for this java program]


Navigate back to YOURUSERID.JAVAJCL(JAVABTCH) and type "sub" on the command line to submit it again. Again, look at your output in the:


YOURUSERID .JAVAOUT(PERSNOUT) member to see the result of the change you made. If it did not run, fix your typos and rerun it.


You have just completed PART 1

In it you:

Edited Java JCL

Submitted that JCL to run a Java program

Checked its output for accuracy

Then, you edited a Java source program

Submitted the JCL to run that Java program

Checked its output for accuracy

 


PART 2 - MORE JAVA Programs


It is critical that you completed the following 3 steps correctly when you used them to solve PART 1 above:


A. Type HILITE AUTO on the command line. The HILITE command allows the ISPF editor to color-code data based on context when you are Editing or Viewing a member.

 
B. Go to ISPF edit and navigate to YOURUSERID.JAVAJCL(JAVABTCH) and take a look at the JCL.  Change the jobname to JAVAS0##, where ##  are the last two digits of your ID.


C. Also, change all other instances of unts0## to match your user ID,
making sure your userid is typed in lowercase if shown in lowercase and uppercase if shown in uppercase.


If you did, please continue:
-----------------------------------------------------------------------------

Your actual tasks for this step are to run the following seven [7] JAVA programs on the Systems Z mainframe:


JAVA  program name                 input file name           output file name


1. CONTRIB                                      CONTIN                         CONTOUT
2. AVERAGE                                     AVERIN                         AVEROUT
3. IFELSEIF                                       IFIN                               IFOUT
4. DATEEX                                       DATEIN                         DATEOUT
5. NESTED                                        NESTIN                          NESTOUT
6. STRINGEX                                    STRNGIN                       STRNGOUT
7. SWITCHEX                                   SWITCIN                       SWITCOUT

All 7 of these programs are in your JAVAPGMS folder on the system Z.

THESE PROGRAMS ALL CALL FOR EXTERNAL INPUT,  SO THERE ARE INPUT FILES for these JAVA programs in the JAVAIN folder on the system Z.

You must use the following instructions to complete these tasks.


Edit the JAVABTCH JCL that you used in  PART #1  [above] using the following steps:


Go to line 10 [OPUT] and change the program name in ( ) after JAVAPGM to the name of the program you are running for example:
YOURUSERID.JAVAPGM(CONTRIB)


Next
Change the name of the .java program on that same  line 10 to the name shown in the actual JAVA program for example: “public class Contrib” would be:   /z/youruserid/Contrib.java     [remember JAVA is case sensitive]


Next
Make the same changes on line 15 and on line 24 
  [note: the .java extension does not appear on line 24]


Next
Go to line 25 and change the name after JAVAOUT to what I gave you above for each of the 7 programs:
Example JAVAOUT(CONTOUT) [note they are all 8 characters or less]

Next
Go to line 26 and change the name after JAVAIN to what I gave you above for each of the 7 programs:
Example JAVAIN(CONTIN) [note they are all 8 characters or less]


Next
SUBmit the JCL and then go to the JAVAOUT folder on the System Z and see if you have output in CONTOUT.

If you do, you have successfully run the 1st of the 7 programs that you must edit and submit.

If not, you must correct your typos and SUBmit the JCL again.

 

NOW, run the other 6 JAVA jobs following the same steps as used in the 1st program,


I will grade your JAVAOUT folder.

10 POINTS


END OF PART 2