| Oliver Wong 2007-03-20, 7:55 am |
| Thanks for the replies I got so far. I guess I'll try asking here first,
and see how things goes.
So here's my question:
I have a couple of JCL reference manuals that I've been going through back
and forth, but I feel I only have the vaguest sense of how JCL works. I
believe the dialect I'm working with is the zOS MVS one.
Here's the example I'm currently working through:
//JOB45 JOB (CFH1,2G14,15,,,,2)
//STEP1 EXEC PGM=PRINT
//ABLE CNTL
//STATE1 PRINTDEV BUFNO=20,PIMSG=YES,DATACK=BLOCK
//BAKER ENDCNTL
//CALLER DD UNIT=3800-3,CNTL=*.ABLE
My understanding is that the first word on each line after the double
slashes serve as labels to refer to each line (in the same way that you
assign number as labels for each line in a BASIC program). The next word
is the type of statement for that line, and everything after that varies
depending on the statement.
So the first line, JOB45, defines a JOB called "JOB45". It has a bunch of
parameters which seem to be referred to as "Accounting information" by my
reference. My understanding is that this has something to do with letting
the OS prioritize or otherwise sort the jobs, and that it isn't too
important for this isolated example.
The next line, STEP1, says that the first step of the job is to execute a
program (perhaps written in COBOL) called "PRINT".
The next three lines, ABLE, STATE1 and BAKER, I don't really have a clue
to what they do, though I'd guess the STATE1 line involves printing
something, somewhere.
The last line, CALLER, is a DD statement. I think I know what a DD
statement does when it's associated with an EXEC statement: It controls
where the input and ouput for a program comes from and goes to. In terms
of implementation, I guess it would redirect the standard in, standard out
and standard err of a program, and in the case of COBOL, with the LINKAGE
SECTION. From my reference manual, it sounds like the UNIT parameter has
something to do with referencing some specific hardware device. I don't
know what the CNTL parameter does, and I suspect it has something to do
with the CNTL statement.
I also don't understand what the DD statement is doing there, after the
CNTL statement, instead of directly after the EXEC statement.
For the JOB, EXEC and DD statements; is my understanding correct so far?
And can anyone shed some light on the CNTL and PRINTDEV statements?
- Oliver
|