Tasks
- Find your library INSXXX1.INS2000.FIRSTLIB which was created in connection with Assignment
3. It will have members called BKFAST, DINNER, LUNCH, AND SNACK. Using any technique
you wish, list, print, or display the records in LUNCH in order to find out the sequence
numbers of each of the records. (The sequence numbers will have six to eight digits each.)
You will need to know the sequence numbers of the records BOLOGNA SANDWICH and MILK for
the next step.
- Create a job in a library member called INSXXX1.INS2000.JCL(SCRATCH) that uses utility
IEBUPDTE to scratch (delete) the records for BOLOGNA SANDWICH and MILK. (Use the job in
Figutre 5.13 for guidance in constructing this job.) After the job has run successfully,
print the member to show that only ICE CREAM and BBBBBBBB remain in the member
LUNCH.
- Use any technique you want to delete member DINNER from the library
INSXXX1.INS2000.FIRSTLIB. (You need not turn in a printout showing how you did Step
3.)
- Create a new library called INSXXX1.INS2000.JCLJOBS and give it 10 tracks of space with
5 blocks for the directory. Write a job in a file called INSXXX1.INS2000.JCLJOBS(COPY)
that uses the IEBUPDTE utility to copy the member called SNACK from the library
INSXXX1.INS2000.FIRSTLIB to the library INSXXX1.INS2000.JCLJOBS. Use the job in figure
5.16 for guidance. Ask for a printout of all records in the member in connection with the
member copy operation.
- Now we will take the job you created above (INSXXX1.INS2000.JCLJOBS(COPYJOB)) and turn
it into a PROC. First, though, we need an appropriate place to put the proc, so use any
technique you wish to create a library called INSXXX1.INS2000.MYPROCLB. Give THE LIBRARY
15 tracks with 5 blocks for the directory. (You need not turn in anything that shows how
you created this proclib.) (Note: The real proclib is called SYS1.PROCLIB, but we
do not have the authority to add PROCS to the live system proclib. Thus, we are creating
our own (MYPROCLB) to play with, even though we can not actually execute PROCs from
it.)
- Now build a job called INSXXX1.INS2000.JCLJOBS(MAKEPROC) by following the guidance in
Figure 8.4. The PROC will be called COPYMEM and will be nothing more than the job you
created above (INSXXX1.INS2000.JCLJOBS(COPYJOB)) modified into a PROC. Some important
points to consider:
- PROCs do not contain input statements like SYSIN DD *. These statements have to be
manually placed at the end of the jobs that actually execute PROCs, as shown in the
example in Figure 8.14.
- Think. Remember, the example code is only that -- an example. You will have to modify it
according to the task at hand here.
- Use symbolic parameters for the name of the input library and the output library. Call
them INLIB and OUTLIB, respectively. (You can hardcode the name of the member being
copied.)
- Put some comments into the PROC that explain the meaning of the symbolic parameters, as
was done in the example in Figure 8.7.
- To be sure your PROC was created correctly, use a utility to look at
INSXXX1.INS2000.MYPROCLB(COPYMEM) to be sure it is there and that it is correct.
7. Finally, write a small job to execute your PROC. Use Figures 8.14 and 8.15 as
guides, and remember to code in the values of INLIB='INSXXX1.INS2000.FIRSTLIB' and
OUTLIB='INSXXX1.INS2000.JCLJOBS' . Call the job that executes the PROC
INSXXX1.INS2000.JCLJOBS(RUNPROC). We can not actually RUN this PROC because we don't have
the privilege needed to be able to add procedures to the real PROCLIB, so this will be the
end of the assignment.
What to Turn In
- Printout showing the contents of LUNCH after two records were deleted.
- Printout showing SNACK as a member of INSXXX1.INS2000.JCLJOBS
- Printout of the job INSXXX1.INS2000.JCLJOBS(MAKEPROC) showing that it placed the PROC
into MYPROCLB correctly.
- Printout of the job that would run the PROC (INSXXX1.INS2000.JCLJOBS(RUNPROC)).
Evaluation
This is a 12-point assignment, as follows:
Two records successfully deleted from LUNCH (Step 2) 2 points
Member SNACK successfully copied into INSXXX1.INS2000.JCLJOBS 3 points
PROC
COPYMEM successfully placed into INSXXX1.INS2000.MYPROCLB 5 points
Job
to run the PROC INSXXX1.INS2000.JCLJOBS(RUNPROC) correct. 2 points