Вы находитесь на странице: 1из 4

Facilitator's Guide

Exercise 1 - JCL Statement and Data Set Creation

What This Exercise is About


This online lab tests the materials in the first UNIT of the course.
Please review the slides and the outside reading material prior to
working the lab.

What You Should Be Able to Do


At the end of the lab, you should be able to:
 Code a Job Statement.
 Create data sets.
 Code a two step job and use the PARM parameter.
 Delete a data set.
 Process instream and sysout data.

 Copyright IBM Corp. 1997, 2000 Unit 2. Exercises 2-15


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Facilitator's Guide

Start of Exercise

PART ONE
Create a Job Statement
1. Step 1
 Code a JOB Statement that has the following information
 A jobname beginning with your userid followed by 1 character
 Accounting information supplied by your instructor
 Programmer information
 MSGCLASS supplied by your intructor
 CLASS supplied by your instructor
 MSGLEVEL supplied by your instructor
Note: This is your job statement, which you will copy to the beginning of each
lab job. You won't have to code it again.
2. PART TWO.
3. Description Create two data sets. Use member JOB1 in your PDS.
4. Add a region of 512K tothe JOB statement
5. Step 1. Execute a prgoram named IEFBR14
 Using ddname DD1, create and cataloged a data set named
MJSN.$H3838.TEAM.ONE. Allow for 5 tracks primary and 2 tracks
secondary on a SYSDA volume.
 Using ddname DD2, create and keep a data set named
MJSN.$H3838.TEAM.TWO. Allow for 1 track on a SYSDA volume.
 Save your work
6. To submit your job
 Move the cursor to the command line and type save;sub;tso sdsf o.
Record the job number when the job is submitted.
7. To view your output
 Move the cursor to the left of the jobname on the SDSF display and type s.
Your job output will be displayed.
 To purge jobs from the output queue, place the cursor next to the jobname
and type p
8. To prepare for another job submission
 Use the PF4 Key to return to ISPF/PDF. If your job had errors, you can
correct them. Otherwise start on the next job.

2-16 Enterprise Server - JCL Programming  Copyright IBM Corp. 1997, 2000
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Facilitator's Guide

 To submit another job, press the PF12 Key to retrieve the last command. If
save;sub;tso sdsf o was retrieved, then just press the ENTER key.
9. Using SDSF, look at the allocation/termination messages and record the volume
serial containing each of the data sets you created:
Volume serial for MJSN.$H3838.TEAM.ONE is__________________________
Volume serial for MJSN.$H3838.TEAM.TWO is_________________________
(Note: If the TSO system is SMS enabled then these data set will get cataloged
also)
10. PART THREE.
11. Description Execute a program which prints input parameters in block
characters. This is a two-step job. Use member JOB2 in your PDS.
12. LOADALFA requires three data sets:
 Allocate the ddname SYSIN, to the cataloged data set named
C12.$H3838.HALFDATA
 Allocate the ddname, ALPHA, to the data set named
MJSN.$H3838.TEAM.ONE, the data set you created in PART TWO of this
exercise.
 Allocate the ddname, STEPLIB, to the cataloged data set named
C12.$H3838.LOADLIB
13. Step 2 Execute a program named GENCHAR, passing to it as parm information
your first and last name, separating them with a comma.
14. GENCHAR requires three data sets:
 Allocate the ddname GENFILE to SYSOUT li.Allocate the ddname, ALPHA,
to data set named MJSN.$H3838.TEAM.ONE, the data set you created in
PART TWO of this exercise.
 Allocate the ddname, STEPLIB, to the cataloged data set named
C12.$H3838.LOADLIB
15. To ensure that both steps ran, use SDSF to check for your names displayed in
block characters on the last screen of your output.
16. PART FOUR.
17. Description. Delete two data sets. Use memeber JOB3 in your PDS.
18. Step 1 Execute a prgram named IEFBR14.
 Using ddname DD1, delete your data set named MJSN.$H3838.TEAM.ONE
19. Step 2 Execute a prgram named IEFBR14.
 Using ddname DD2, delete your data set named MJSN.$H3838.TEAM.TWO
20. Using SDSF to verify that your data sets named MJSN.$H3838.TEAM.ONE and
MJSN.$H3838.TEAM.TWO have been deleted by the system.

EXERCISE SOLUTION

 Copyright IBM Corp. 1997, 2000 Unit 2. Exercises 2-17


Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Facilitator's Guide


START OF (JOB1)

 Top of Data 
//TSOEFFF1 JOB (12345678),'ROULETTE',MSGLEVEL=(1,1),
// NOTIFY=TSOEFFF,MSGCLASS=A,CLASS=A
//FFFPROC JCLLIB ORDER=(TSOEFFF.PROCLIB)
//JESDS OUTPUT PAGEDEF=V,6483,JESDS=ALL,DEFAULT=Y,CHARS=GT15
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=TSOEFFF.$H3838.TEAM.ONE,SPACE=(TRK,(5,2)),UNIT=SYSDA,
// DISP=(NEW,CATLG)
//DD2 DD DSN=TSOEFFF.$H3838.TEAM.TWO,SPACE=(TRK,1),UNIT=SYSDA,
// DISP=(NEW,KEEP)
 Bottom of Data 

START OF (JOB2)

//TSOEFFFP JOB (12345678),'ROULETTE',MSGLEVEL=(1,1),
// NOTIFY=TSOEFFF,MSGCLASS=A,CLASS=A
//FFFPROC JCLLIB ORDER=(TSOEFFF.PROCLIB)
//ESDS OUTPUT PAGEDEF=V,6483,JESDS=ALL,DEFAULT=Y,CHARS=GT15
//STEP1 EXEC PGM=LOADALFA
//STEPLIB DD DSN=TSOEFFF.C12.$H3838.LOADLIB,DISP=SHR
//ALPHA DD DSN=TSOEFFF.$H3838.TEAM.ONE,DISP=(OLD,KEEP)
//SYSIN DD DSN=TSOEFFF.C12.$H3838.HALFDATA,DISP=(OLD,KEEP)
//STEP2 EXEC PGM=GENCHAR,PARM='DEBORAH,ROULETTE'
//STEPLIB DD DSN=TSOEFFF.C12.$H3838.LOADLIB,DISP=SHR
//GENFILE DD SYSOUT=
//ALPHA DD DSN=TSOEFFF.$H3838.TEAM.ONE,DISP=(OLD,KEEP)
 Bottom of Data -------

START OF (JOB3)

//TSOEFFF3 JOB (12345678),'ROULETTE',MSGLEVEL=(1,1),
// NOTIFY=TSOEFFF,MSGCLASS=A,CLASS=A
//FFFPROC JCLLIB ORDER=(TSOEFFF.PROCLIB)
//JESDS OUTPUT PAGEDEF=V,6483,JESDS=ALL,DEFAULT=Y,CHARS=GT15
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=TSOEFFF.$H3838.TEAM.ONE,DISP=(OLD,DELETE)
//DD2 DD DSN=TSOEFFF.$H3838.TEAM.TWO,DISP=(OLD,DELETE),
// UNIT=SYSDA,VOL=SER=DMTP,5
 END OF PROGRAM 

This concludes Lab Exercise 1. Log off your TSO ID and return to the student guide.

END OF LAB

2-18 Enterprise Server - JCL Programming  Copyright IBM Corp. 1997, 2000
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.

Вам также может понравиться