I used to "run" JCL. I don't care that I submitted it to run it, run it is what we did. I don't think this is an occasion where there is strict terminology involved.
JCL is a language (however limited as such - ie it is very specific, not in any way general purpose). Is it compiled? No. So we all know really that it is interpreted, at least in the sense that if it is one or the other, it sure ain't compiled.
I like Steve's answer, and Enrico can back it up with the data.
I'm not sure I'd ever call JCL a "scripting language", even though that wasn't even the question asked originally (or asked in the first part of MrH's post).
neha.sinha wrote:When we call a cobol program from a jcl, we invoke the cobol compiler. At this point, does the interpreter invoke the compiler? Does the compiler pass the result/machine code back to the interpreter?
At each job-step, the JCL processor will cease working for a short while while the program specified is executed. Then the JCL processor will pick up again. The "syntax" of the JCL has been validated up-front, and you whole job will simply be tossed out if that is wrong, so maybe we can say it is a two-stage interpreter?
The program that is executed, by the JCL, has no, well, OK, some, real communication with the JCL. The Cobol compile will take your source, syntax-check-and-covert-it and store it on disk as an "object" and give you an output listing that you can print or whatever. All the resources used by the Cobol compiler have to be established in the JCL, the disk files to read/write, the location of the output list, the disk which contains the library with the compiler on it, etc. Withouth the JCL, you'd have to manually get all these things ready, with physical switches, and stuff like that. Guess how JCL evolved....