Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JCL

Status
Not open for further replies.

gust1480

Programmer
Mar 19, 2002
148
0
0
PH
Can somebody explain to me what does a JCL(Job Control Language) exactly do?
 
In a nutshell, though I'm sure someone will have a more scientific definition, JCL(Job Controll Language) executes a progam (compiled and linked machine code) within a load library, providing a number of resources to that program: File names (data files, work files), input parameters, and other information, discussed below, within a batch environment, as opposed to a TP monitor like CICS, where jobs are transactions, and all the information a transaction needs is predefined within CICS itself (file names, program names) and by real-time user input.

JCL executes a Job which executes the program directly or invokes a Proc (another set of JCL) to execute the program. Many jobs can call the same Proc, passing different parameters. This provides for some level of reusablity. Jobs reside in job libraries and procs, in proc libraries, or in a configuration management tool which draws this distinction. Input to the program resides in control libraries. Programs reside in source libraries.

JCL is submitted to a job queuing system like JES for OS/390 or POWER for VSE/ESA. The job goes into a input queue, then a run queue, then an output queue. The parameters specified on the JCL 'JOB' card determine how it interacts with the queing system. That is, the job priority (based on a ru n class), how long the job can run, the user id of the submitter of the job (which in a producton environment is a scheduler system), the print class, job accounting info, and more.

The interface to the queuing system, for OS/390 is SDF (natively provided by IBM) or IOF, a third party product.

Hope this helps.
 
Yes, Dhect has it right.

For UNIX fans I could compare mainframe JCL to shell scripts that set up environmental variables, run executables, etc.

JCL has a SORT utility, IDCAMS for VSAM files in MVS and VSE/ESA, IEBGENER to print or create flat files in MVS, IEFBR14 to delete flat files, etc.

I've primarily worked with MVS/OS 390 IBM 9000 mainframe systems but now I have a consulting gig that has me working on a VSE/ESA machine for the first time.

There are SYS DD statements to set up file addresses/references to the program and the JCL for MVS. VSE/ESA uses DLBL .

MVS allows you to create your own work files but VSE/ESA may not. In my current environment the mainframe systems group creates the work files.

Hope this helps and doesn't confuse you. There are some good JCL texts out there. You might have to find them on half.com though.

Good luck,

Oldcoboler
 
This is a little off-topic, perhaps there are some areas to discuss JCL related commands.

There are different ways to refer to files in VSE/ESA. A lot depends on how your Drives are set up and formatted in your mainframe system. We usually catalog the files so they can be referred to with a synonim in the program without having to reference their address. However usually work files can be set up using the DLBL, EXTENT and ASSGN statements.

// DLBL SD35,'MAST.SD.FILE',0
// EXTENT SYS035,VSEWK3,1,0,4920,105
// ASSGN SYS035,E02,SHR

Often we have a work file or SD file that is used in several programs so we have that set up in a seperate JCL that we use as a procedure. On the mainframe sometimes the addresses are in blocks and sometime in tracks. You really need help from your System Administrator if you do not know what to use for the address and size of the work file. Usually several areas are set up for use. Normally we can look at another program and just use what we used last time. Some jobs are special if they use a really big work area. Care must be taken not to run over the top of another person's work files if they are in the middle of running critical programs that reuse the same work files.

We do not use DD descriptions for the files but they are in a copy book if they are used in more than one porgram.

In JCL you can use System Commands and Power System Commands. If you have a special package on your system it may also be possible to use commands to open or close files off to CICS access from inside a batch job in your JCL. This keeps people from accessing files with interacive on-line programs while you are updating them. We dont try to get too fancy with the JCL. JCL can be used for many things to set up and control system activities in a system like library and catalog commands.

This is a little off-topic, perhaps there are some areas to discuss JCL related commands. This is highly System Specific. However if you mentioned VSE/ESA you are probably using an IBM Mainframe. We use an IBM MultiPrise (Spell) System. We converted over about a year ago from an older IBM mainframe that was a dinosaur. However our old system applications were able to be set up on the new system without too much trouble.

Perhaps someone can recommend a book or a website on VSE/ESA JCL. If you do not like my post feel free to point out your opinion or my errors.
 
Hi OCer,

I've just got one minor bone to pick w/your reply. All the utilities you mention are really not part of the JCL facility, they're just pgms like the ones you & I write (well..., sort of :)). They use JCL to run, just like the rest of us.

Regards, Jack.

 
I get your point, but you have to have some kind of program to edit the JCL, unless you are using punch cards. We have some Barnard FTP utility program and we use Power. We use ICCF to edit the JCL. The POWER system is like a job control system that encapsulates the actual JCL. Se we are using power commands and system commands. Then we have an CICS system that controls the online program environment.

Different locations use different programs to edit JCL. I am aware that not everyone uses ICCF.

Since I have never run a Mainframe before the days of the Card Readers, I can't always appreciate some of the details that a real systems programmer does to make my life easier. If you do not like my post feel free to point out your opinion or my errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top