Saturday, 10 August 2013

JCL Miscelaneous JCL Features.

JCL provide variety of feature that is used for day to day activity.
Below is list of couple of miscellaneous feature:
  • CHECKPOINT/RESTART
  • SPANNED RECORDS
  • DATA SET PROTECTION
  • JOB EXECUTION PRIORITY
  • NULL STATEMENT
  • OPERATOR COMMANDS
  • CNTL/ENDCNTL PROGRAM CONTROL STATEMENTS
  • XMIT DATA TRANSMISSION STATEMENT
CHEKPOINT/RESTART
Z/OS allows programs that abnormally terminate, and even those that run to completion, to be restarted so that the entire job does not need to be rerun if an error occur. There are two methods of restarting a job:
  • Step Restart.
  • Checkpoint Restart.
STep restart is simpler and doesn't require the system to take a checkpoint.
A restart can be automaic or defferred  To restart wether automatic or deferred is specified by the RD parameter on the EXEC parameter. Automatic restart will can occur only if the completion code assocated with the step agrees with a set of eligible completion code specified by the installation, and if operator consents.
Checkpoint consist of a snapshot of a program's status at selected points during execution so that if the program terminates for some reason, the run can restart from the last checkpoint rather than be beginning of the run.
CHKPT=EOV : Coding CHKPT=EOV on DD statement will tell system to take a checkpoint when the end of  volume is reached on a sequential data set.
Example :
//STEP010 EXEC PGM=EMP001
//OUTFLE DD DSN=DTF.FFT.SEQFLE.EMPSAL,DISP=SHR,
//                 UNIT=TAPE,VOL=SER=(0041,004002),CHKPT=EOV

RD on EXEC Statements : The RD parameter on the JOB or EXEC statement controls automatic restart and may also supress the CHKPT macro so that no checkpoint are taken.
Restart ConditionAutomatic RestartSupress CHKPT
R- RestartYesNo
NC- No CheckpointNoYes
NR- No automatic restartNoNo
RNC- Restart and no checkpointYesYes
Example : 1
//STEP010 EXEC PGM=EMP002,RD=R
Example : 2
//RC0001 JOB (00012),'RUCHIN',CLASS=A,RD=R
RESTART: Resubmit a job for Restart.
After examining the output from your job, you may elect to restart it later from a checkpoint or the start of a job step. You can use deferred restart regardless of the way the job terminates- abnormally or normally and irrespective of wether automatic restart occured.
Syntax :  RESTART=stepname
               RESTART=stepname.procstep
               RESTART=*

Example : 1
//RC0001 JOB (00012),'RUCHIN',CLASS=A,RESTART=STEP010
Restart from Checkpoint.
The restart parameter on the JOB statement, in addition to specifying the step at which to restart, can also name the checkpoint to use for the restart.
Syntax :  RESTART=(stepname,checkid) 
               RESTART=(stepname.procstep,checked)
               RESTART=(*,checked)
Example : 1
//RC0001 JOB (00012),'RUCHIN',CLASS=A,RESTART=(STEP010,CK010)


Created with Artisteer

No comments:

Post a Comment