CSCI 465 Assignment 2

Job Control Language

(50 points)

This assignment has three parts.

The three parts must be run as separate jobs. JCL must be properly documented in all parts. Turn in all three parts of the assignment. Put your name (and other required information) on each one and then clip the three parts together.

Although we are using the code from Assignment 1, we don't need for Assignment 1 to work perfectly. We simply need an assembly-language program to assemble, link-edit and execute.


Part 1 -- 20 points

This job has 2 steps: the assembler and the Loader. Assemble and execute your assignment 1 assembler program using the loader (i.e., HEWLDRGO). Use NOXREF, NOESD, and NORLD as Assembler options and use MAP and LET as Loader options. Do not allow the Loader to execute if the return code from the Assembler is greater than zero.


Part 2 -- 20 points

This job has 2 steps: the assembler and the linkage editor (i.e., HEWL). Assemble your assignment 1 source code using the same Assembler options as above, but use NOLIST as well. Use MAP option for the linkage editor. In the linkage editor step, stored the new load module stored in a permanent PDS on your own MVS account. The linkage editor step should not execute if the Assemble step return code is not zero. If the linkage editor step terminates abnormally, you will have to delete the PDS before you can rerun this part. Read about the IEFBR14 utility in your class notes which you can use to delete a PDS. See further discussion of this below.


Part 3 -- 10 points

This job has 1 step: Execute the load module created by the Linkage Editor in part II. On your final run, the one you turn in to be graded, add a job step (or two) to execute IEFBR14 to uncatalog and delete your PDS. Again, see further discussion below.


Note about Permanent Data Sets

When you create a permanent data set here at NIU, you have to specify whether or not to catalog it. If you do not catalog a data set, then it may be removed from the volume on which it was saved by the next day. This is important to know. If, for example, you ran part II above on a Tuesday and created a permanent library with your load module in it that was not catalogued, then if you came in to run part III on Wednesday, the library (and your load module) may not be there. You would have to first rerun part II. If you ran part III on Tuesday (the same day as the day you created the library), then everything would be fine.

To get a data set to stay permanently on a volume, you must specify that it is to be catalogued when you create it. If a data set is catalogued, then in order to successfully delete it, you may need to run IEFBR14 twice. The first time you indicate that the data set should be uncatalogued. The second time you indicate that it should be deleted.

What does all of this mean? It means that when you run part II, if your PDS gets catalogued and your job abends, then before you can rerun part II you may need to execute IEFBR14 twice: once to uncatalog it and once to delete it. If you run part II and do not catalog your PDS, then you would only have to execute IEFBR14 once (just to delete it) before you could run part II a second time.

Likewise for part III. On your grade run you are to delete the PDS that contains your load module. If the PDS was catalogued, then you may need to execute IEFBR14 twice: once to uncatalog and once to delete. If the PDS was not catalogued, then you only need to execute IEFBR14 once, just to delete the library.

If you run IEFBR14 once, ordering that a data set should be deleted, it is possible that the data set will be uncatalogued and then deleted, but there are reports that this is not always the case. You can easily determine what has happened from the JCL messages.

Also note that submitting a job for printing does execute the job, which means if you submit part II for fetch, you'll need to delete the PDS before you can submit it to print. If you don't delete the PDS, you will get a "duplicate data set name" JCL error.