Use ISPF (or equivalent function) to edit the data set that you
just allocated.
Enter the following JCL statements into the data set. Note that
all JCL statements start with the special identifier //.
//SORT JOB 'accounting_data', 1
// 'user_name', 2
// NOTIFY=&SYSUID, 3
// MSGCLASS=message_class, 4
// MSGLEVEL=(1,1), 5
// CLASS=nnnnnnnn, 6
//STEP1 EXEC PGM=IEFBR14 7
//SORTIN DD * 8
NEPTUNE 9
PLUTO
EARTH
VENUS
MERCURY
MARS
URANUS
SATURN
JUPITER
/* 10
//SORTOUT DD SYSOUT=* 11
/* 12
In the JCL code above:
- 1
- Replace accounting_data with the appropriate security
classification and identification information, according to the information
you filled in on Installation conventions worksheet.
- 2
- Replace user_name with your name.
- 3
- NOTIFY= tells the system where to send “job complete”
information. &SYSUID tells the system to automatically insert
your user ID here, so the information will be sent to you.
- 4
- MSGCLASS= tells the system what to do with messages the system
sends you as it processes your job; for example, use a held output
class to allow reviewing the messages later. Replace message_class with
the appropriate message class value. Check your Installation conventions worksheet.
for the appropriate value.
- 5
- MSGLEVEL=(1,1) tells the system to reproduce this JCL code in
the output, and to include allocation messages.
- 6
- CLASS=nnnnnnnn indicates the system resource
requirements for the job. Check your Installation conventions worksheet. for the
appropriate value.
- 7
- The EXEC statement invokes the program IEFBR14 and identifies
the first (and only) job step in this job. You are arbitrarily naming
it STEP1. All of the control statements that follow the EXEC statement
(until the next EXEC statement, if any) are part of this job step.
IEFBR14
is the name of a program within your MVS™ system. It does not actually process any
data, but it enables you to run this job as a test to verify the JCL
statements, and to create the input data. Later in the exercise you
will replace IEFBR14 with the name of another program that sorts data.
- 8
- SORTIN is the name you have given the DD statement that describes
the input data.
- 9
- NEPTUNE through JUPITER are the items to be sorted. This method
of providing data to the program is referred to as in-stream data,
an alternative to providing the input in a separate allocated data
set.
- 10
- /* indicates the end of the input data stream.
- 11
- SORTOUT is the name you have given the DD statement that describes
where the output from running the job will be placed. In this example,
SYSOUT=* specifies that the output data will be directed to the SYSOUT
device defined in the MSGCLASS statement.
- 12
- /* (optional) denotes the end of the job.
For detailed information on each of the JCL statements and syntax
requirements, refer to z/OS MVS JCL Reference.