Kent State University
Large Systems Technology
How to Enter and Run a Job in JCL
Part 1: Enter the JCL Code As a Text File
1. If you're not already logged on, get to the ISPF main menu panel using the procedure in the separate logon handout
("How to Access the IBM MVS Mainframe").2. Follow the directions in "Allocating a New Data Set" to allocate a new dataset called INSXXX1.INS2100.CTRL. Fill in your own UserID for the "XXX." (This is obviously a library.)
3. Follow the directions in the "ISPF Assignment" sheet for how to open up the editor and create a text file. Call the dataset INSGSH1.INS2100.CTRL.JCLJOB1. After you have entered all the code EXACTLY as below, the editor should look like this. (Don’t type in the line numbers – the editor will put them in automatically.)
Your total file will consist of the contents of the panel below PLUS the next panel.


4. Triple-check that you have entered all the above EXACTLY correctly. If you get stuck in the editor, refer to the "ISPF Assignment" sheet for how you entered the first text dataset. To save the contents of your editing session, put the cursor up in the command line and enter "SAVE." (If you want to leave the editor session and come back later, simply hit PF3. In ISPF, PF3 does both a save AND an exit. It is the equivalent of entering "FILE" in XEDIT.)
Part 2: Run the Job
5. If you are ready to run your job, go to the command line in the editor and type SUBMIT, then hit <ENTER.> You will be asked at the bottom of the screen to enter a "jobname character." In the example, I put in an "A", then hit <ENTER>.
6. Now the editor screen looks like this, indicating that your job has been submitted by JES2 for processing.

Part 3: Analyze and/or Print Your Output
7. Hit <ENTER> again, and you will get a message back on the status of your job. Most likely, it will be a JCL error the first few times, as below.

To look at your output, hit <ENTER> and the ISPF edit screen will reappear. In the command line, enter =A.H then press <ENTER>. (Entering "A.H" is the quick-path way of going back to the ISPF main menu, starting SDSF, and then selecting the "Hold" queue for display.) You will get a screen like this:

8. Use the TAB or up/down arrow keys to get the cursor to the line for the job that you just ran. (Since we entered a jobname character of "A", the last line for job INSGSH1A is the one we want.) Put an "S" at the left of the line, then <ENTER>.
9. This will display your job output from the spooler. It will look something like this (right hand part cut off):

You can use PF7, PF8, "LEFT 50", "RIGHT 50" etc., to move around in this display.
10. Analyze this output. Either your job ran right or you will need to make some changes. (In this case you will see that the job failed because the dataset already existed.) To get back to the editor, enter =2 on the command line of the above screen, returning you to the "EDIT - ENTRY PANEL", then hit <ENTER>. This will get you to the list of editable files. Put an "S" opposite the one you want to edit, as below.

Hit <ENTER>, and you will be back at the original JCL file. From here you are back at step "4" (above), and can modify and rerun your job as many times as needed.
Note: Over time, you will get a LOT of files in the HOLD queue. To get rid of one or more files in that queue, put a "P" (purge) opposite those you want to zap, then <ENTER>. For example:

11. Once the JCL job above finally executes correctly, you will be able to look at the contents of the file using the editor. Go to the editor Entry Panel and set it up as below.

Then hit <ENTER> to get to the editor and you will see the four records in the file you just created.
