restart jcl syntax

Restart JCL in Minutes: Master Syntax Refresh

By James Brown
AD

In the world of enterprise computing, have you ever found yourself in a situation where you needed to restart a Job Control Language (JCL) job, but weren't sure how to do it? Restarting JCL syntax can seem daunting, but with the right understanding, it's a manageable task. Let's break down the process into simple, digestible steps.

Before we dive in, a quick note: JCL, also known as Job Control Language, is a programming language used to specify jobs in a z/OS or z/VM environment. It's a text file that tells the operating system what to do and how to do it. Now, let's get back to restarting JCL syntax.

Understanding JCL RESTART LIBRARY

To restart a JCL job, you'll need to be familiar with the RESTART LIBRARYparameter. This is a unique library that holds the control blocks of the restarted jobs. It's important to note that the RESTART LIBRARY must be specified before the EXEC statement, and it must be a different library from the input and output libraries.

AD
the word restart in white on a black background
the word restart in white on a black background
the logo for restart is shown in white and blue on a black background,
the logo for restart is shown in white and blue on a black background,
SYSTEM RESET: Legacy processes detected.
SYSTEM RESET: Legacy processes detected.

Let's illustrate this with an example. Suppose you have a JCL job that reads a file from an input library, processes it, and writes the output to an output library. You can restart this job by specifying a new RESTART library:

  1. Specify the RESTART LIBRARY parameter, such as `RESTART LIBRARY('RESTART.LIB')`.

  2. When restarting the job, the system reads the control blocks from the RESTART.LIB library and uses them to resume the job.

Types of Restarts

A major consideration when restarting JCL syntax is the type of restart you're performing. There are three types of restarts:

Syntax Error Simplified...........
Syntax Error Simplified...........
system reset
system reset
a black background with the words restart in white letters on it's left side
a black background with the words restart in white letters on it's left side
  • Unconditional restarts: These stop the job at the end of its current step. The job can be restarted from this point.

  • Conditional restarts: These stop the job if a specified condition is met. The job can be restarted from this point.

  • Job restarts: These stop the entire job, including all its steps. The entire job must be restarted.

Understanding these restart types can help you decide how to restart your JCL job based on your needs.

Specifying RESTART Options

When restarting a JCL job, you can specify several options to control how the job is restarted:

AD
  • `RESTART=YES`: Specifies that the job is a restart. If this option is not specified, the system assumes that the job is a new job.

  • `RESTART.OPTIONS=(ADDRESS=(LIBRARY,),STEP=(,))`:

    • `LIBRARY`: Specifies the library containing the restart data.

    • `STEP`: Specifies the step to restart. If not specified, the system restarts at the beginning of the job.

These options can be tailored to fit the specifics of your JCL job and the type of restart you're performing.

syntax highlighting
syntax highlighting
English Syntax Highlighter
English Syntax Highlighter
a computer screen with many lines of code on it
a computer screen with many lines of code on it
Restart
Restart
an image of a green screen with words written in the language's letters and numbers
an image of a green screen with words written in the language's letters and numbers
js highlighting
js highlighting

Restarting JCL Jobs with Specific ProCLR Options

If you're using ProCLR, you have additional restart options available. ProCLR ( Prozessor Control Language) is an extension to JCL that allows programmatic control of z/OS and z/VM processors.

For ProCLR, you can use the `RESTART` statement to restart a job. Here's a simple example:

AD
pocoib.lib pclib.lib
exec pgoesto=pgm exec Stepname=cobprog,Comlib(pcocomlib),Lrecl=1000
dcl proclr dcl proclr restore( y )
end ' end 'Restart statement'

Here, `RESTORE` is used to restore the save area of the previous step, allowing the job to restart where it left off. This is just one example of how ProCLR offers more flexibility when restarting JCL jobs.

Louis Hjelmslev – Equivalent Exchange
Louis Hjelmslev – Equivalent Exchange
a green screen with the words you have to break the pattern today or the cycle will repeat tomorrow
a green screen with the words you have to break the pattern today or the cycle will repeat tomorrow
Code Syntax Highlighter
Code Syntax Highlighter
Syntax Error
Syntax Error
an image of a computer screen with many numbers and lines on the screen, all in different colors
an image of a computer screen with many numbers and lines on the screen, all in different colors
Cron Job Syntax Cheat Sheet: Decode the 5 Fields in 30 Seconds
Cron Job Syntax Cheat Sheet: Decode the 5 Fields in 30 Seconds
C Programming Syntax Guide for Beginners (Save This)
C Programming Syntax Guide for Beginners (Save This)
an image of a computer screen with code numbers on it and the words print in pink
an image of a computer screen with code numbers on it and the words print in pink
an old computer screen with some type of text on it that says, sentel are you worried yet? 1 8 break the system
an old computer screen with some type of text on it that says, sentel are you worried yet? 1 8 break the system
Rankshifting in Syntax: Meaning, and Examples
Rankshifting in Syntax: Meaning, and Examples
an image of a computer screen with some text in the middle and two numbers on it
an image of a computer screen with some text in the middle and two numbers on it
System.exit(0);
System.exit(0);
a poster with different types of programming
a poster with different types of programming

Monitoring and Controlling Restart Jobs

Once you've restarted your JCL job, it's important to monitor its progress. You can use several tools to check the status and manage your restarted jobs, including:

  • `JOB DATASET`: To view the JCL of the job.

  • `JOB LOG`: To view the log of the job.

  • `JOB CONTROL`: To control the job, including canceling or suspending it.

If you plan to restart your JCL jobs regularly, consider setting up a job schedule using a tool like z/OS Workload Leader or z/OSMF (z/OS Management Facility). This can automate your job restart process and ensure that your jobs run at the optimal time.

AD

Restarting JCL syntax doesn't have to be a complex or daunting task. With the right understanding of the JCL RESTART LIBRARY, the types of restarts, and the specific options for restarting, you can master this crucial skill in no time. Whether you're an experienced mainframe professional or just starting out, restarting JCL jobs is a valuable skill to have in your toolkit. So, next time you find yourself needing to restart a JCL job, remember: with the right understanding and a bit of practice, you're well on your way to mastering JCL restarts.

AD