No Slide Title

Download Report

Transcript No Slide Title

RESTART And Other Program
Execution Facilities
Stephen Linkin
Houston Community College
19-Jan-07
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
1
Objectives

Applied Objectives

Code RESTART On A JOB Statement To Restart A Job:
a.
b.


From The Beginning Of The First Job Step
From The Beginning Of A Named Job Step
Within A Job Or Cataloged Procedure
Assuming a Is Set To WLM Compatibility Mode,
Code PERFORM Parameter On A
JOB Or EXEC Statement To Specify
Performance Group For Job Or Job Step.
Code A Command Statement To Issue
An MVS Or JES Command From The
JCL Stream.
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
2
Objectives

Knowledge Objectives





Explain Checkpoints And How They’re Used In A Job.
Describe How And Why Restart Processing
Is Used.
Explain What An Automatic Restart Is.
Describe What A Performance Group Is.
Name The JES2 And JES3 Statements
Used To:
a.
b.
c.
Restart A Job When The System Fails
Send A Message To The Operator
Specify A Job’s System Affinity
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
3
Supporting Checkpoints
Programming Languages And Utilities
Language
Use
COBOL
PL/I
Assembler language
JCL
DFSORT
Use the RERUN clause in the I-O-CONTROL paragraph of
the Input-Output Section to generate checkpoints within a
COBOL program. The ddname for the data set that stores
the checkpoints is specified in the RERUN clause.
Use the CALL PLICKPT feature to generate checkpoints
within a PL/I program. The ddname for the checkpoint data
set is SYSCHK.
Use the CHKPT macro instruction to generate checkpoints.
The DCB macro specifies the ddname for the checkpoint
data set.
Use the CHKPT parameter on the DD statement to generate
checkpoints whenever the end of a volume is reached for a
sequential data set. The ddname for the checkpoint data set
is SYSCKEOV.
Use the CKPT parameter in sort control statements to
generate checkpoints. The ddname for the checkpoint data
set is SORTCKPT.
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
4
The CHKPT Parameter Of The DD
Statement

The Syntax
CHKPT=EOV

Sample Job Step With EOV Checkpoints
//STEP1
EXEC PGM=INVUPD
//INVOUT
DD DSN=MM01.INV.OUT,DISP=(NEW,KEEP),
//
UNIT=TAPE,VOL=SER=(TAPE01,TAPE02),
//
CHKPT=EOV
//SYSCKEOV DD DSN=CHECK.SAVE,DISP=MOD
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
5
The RESTART Parameter Of The
JOB Statement

The Syntax
RESTART=
( {*
} [,checkid] )
Explanation
{stepname
*
System
is to restart the }job at the first job step.
{stepname.procstepname}
Stepname
System
is to restart the job at the beginning of the
named job step or at a checkpoint within that job
step.
stepname.procstepname Restart the job at the beginning of the named job
step of the cataloged procedure or at a checkpoint
within that job step. Stepname identifies the EXEC
statement that calls the procedure and
procstepname identifies the job step within the
procedure.
checkid
The name of the checkpoint where the system
restarts execution.
Value
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
6
Using The RESTART Parameter

A deferred step restart
//MM01F
JOB (36512),'LE
MENENDEZ',RESTART=STEP3
 A deferred
checkpoint
restart
//MM01G JOB (36512),'J TAYLOR',RESTART=STEP3.INV3020
//MM01H JOB (36512),'M MURACH',RESTART=(STEP2,CKPT4)
//SYSCHK DD DSNAME=MM01.CHECK,DISP=OLD
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
7
The RD Parameter Of The JOB
And EXEC Statements

The Syntax
RD= {R}
{RNC}
{NR}
{NC}

A JOB statement that uses the RD parameter
//MM01A JOB (36512),MENENDEZ,RD=R

An EXEC statement that uses the RD parameter
//STEP2 EXEC PGM=APRUPD,RD=RNC
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
8
RESTART Parameter Of The JES2
/*JOBPARM Statement

The Syntax
RESTART= {Y}
{N}

A job that uses the JES2 RESTART parameter
//MM01A JOB (36512),MENENDEZ,NOTIFY=MM01
/*JOBPARM RESTART=Y
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
9
FAILURE Parameter Of The JES3
//*MAIN Statement

The Syntax
FAILURE= {RESTART}
{CANCEL}
{HOLD}
{PRINT}

Example of using the JES3 FAILURE parameter
//MM01B
//*MAIN
JOB (36512),MENENDEZ,NOTIFY=MM01
FAILURE=HOLD
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
10
PERFORM Parameter Of The JOB
And EXEC Statements

The Syntax
PERFORM=group

A JOB Statement Using PERFORM
//MM02D

JOB (36512),'G MURACH',PERFORM=10
An EXEC Statement Using PERFORM
//APRCALC EXEC PGM=APRCALC,PERFORM=3
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
11
JES2 /*MESSAGE Statement

The Syntax
/*MESSAGE message

/*MESSAGE statement sending message to operator
12345678901---------------------------------------------71
/*MESSAGE NOTIFY ON-CALL PROGRAMMER IF JOB ABENDS
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
12
JES3 //*OPERATOR Statement

The Syntax
//*OPERATOR message

//*OPERATOR sends message to operator
1234567890-13-------------------------------------------80
//*OPERATOR CALL R MENENDEZ – EXT 22 WITH RESULTS
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
13
The JCL COMMAND Statement

The Syntax
//[name] COMMAND 'command command-operand'

COMMAND statement requesting execution of
SEND command
1234567090-----x--------------------------------------------80
//MSG1
COMMAND 'SEND ''PRODUCTION JOB ACCTNG1B IS NOW COMP
LETE.'',USER=(MM01)' **SENDS MESSAGE TO MM01**
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
14
End Presentation
© 2002 - Mike Murach & Associates,
2007 - HCC, IBM
15