Mainframe JCL Procedures

Mainframe JCL Procedures thumbnail
Mainframe computers use JCL to manage batch jobs.

IBM mainframe computers run batch jobs consisting of instructions executed with little-or-no operator intervention. For example, to print a month-end report, an operator submits a batch job for the report; when the job completes, the computer prints the report on a printer. Job Control Language, or JCL, gives the job a name and lists the programs and files the computer uses to carry out the job.

  1. Job Statement

    • The first statement in any job is the job statement or job card. It begins with a “//” followed by a space, an eight-character job name, another space and the word “JOB.” Other optional information may follow JOB, including accounting references and a 20-character comment describing the job. A computer technician monitoring the mainframe can observe the system’s activity by watching the job names on the console screen.

    Exec

    • A job runs one or more programs which read and process data. The JCL specifies these programs with the “exec” statement. It begins with the same double-slash that starts most JCL commands, followed by a space and an eight-character step name, a space and the word “EXEC.” The step name lets the computer keep track of the job’s progress. The exec statement can run a program or a procedure, which is another set of JCL saved as a separate file for convenience.

    Data Definition

    • A data definition statement specifies files that a program uses or creates. It starts with the double slash, a space, a data definition name, and the letters “dd.” The data definition may specify the name of an existing disk file or a new file not yet created. The statement includes options specifying if the file has shared or exclusive use, and whether the computer should keep or delete the file when the job completes. Programs use generic system file names such as “sysout” for output, “sysin” for input and “sysprint” for printed reports. The computer typically has these set to default device or file names, though a data definition statement can assign them to alternate files or devices. For example, a computer sends most of its reports to its main system printer with standard paper, but payroll checks must print on check forms. To solve this problem, the job that prints payroll checks uses a data definition to assign the standard printer device “sysprint” to a printer with check forms.

    Comments

    • Two slashes followed by an asterisk and a blank indicate a JCL comment statement. The computer does not execute comments; comments serve to document the job. Comments may include the date the programmer wrote the job, his name and the organization’s name, descriptions of what the job does and tips for dealing with problems and special circumstances. A job may have any number of comment statements. Unlike other JCL statements, comments have few syntax rules, so a programmer can include information in almost any format.

Related Searches:

References

  • Photo Credit Jupiterimages/Photos.com/Getty Images

Comments

Related Ads

Featured