Step restart

When you rerun a job, you select the range of the restart. The range of the restart is defined by the first and last step to be included in the rerun. You select the Step Restart option in the OPERATION RESTART AND CLEANUP panel.

Step restart allows you to restart the job or the started task at the step level and performs the appropriate cleanup actions. When you request a step restart, the scheduler shows you which steps are restartable and which is the best step. In any case, you can modify the selection made by the scheduler.

The way in which step restart works is based on the simulation of return codes and on the use of data store. The scheduler adds a pre-step, EQQCLEAN, which performs the simulation from the history of the previous runs. This step also performs the cleanup actions and the needed GDG resolution.

Note: Return code simulation, GDG resolution, and cleanup actions are based on the previous run history and used JCL structure. For this reason, changes to the submitted JCL structure (like adding a step, deleting a step, and changing DD names) might cause unexpected results. For example, the EQQCLEAN program uses the list of step names, and the return codes associated with them, that are provided by the scheduler, so that, if a simulated step no longer exists in the submitted JCL, EQQCLEAN fails with a message about step mismatching. For the same reason, it is preferable not to switch from normal JCL to expanded JCL, and vice versa, because the JCL structure could be different (for example when procedures have been changed in libraries).

To perform a step restart with the appropriate data set cleanup actions, HCL Workload Automation for Z needs the JCL extracted from the JOBLOG. This JCL must contain the expanded procedures and INCLUDEs because GDG relative numbers must be substituted with the data set names that are actually allocated. This cannot be done using the JCL OVERRIDE statement if GDGs are inside an INCLUDE. This kind of extracted JCL is called expanded JCL. The only source that can build it is the JOBLOG.

Return code simulation allows for support of IF/THEN/ELSE statements as shown in the following example, where you run the following JCL:

//JOBSAMP JOB (07A2,D07),MSGLEVEL=(1,1)
//S1 EXEC PGM=MYPROG
//S2 EXEC PGM=IEFBR14
//S3 EXEC PGM=IEFBR14
//S4 EXEC PGM=IEFBR15
//SIF IF S1.RC EQ 4 THEN
//S5 EXEC PGM=IEFBR14
//EIF ENDIF
//*

In this example, steps S1, S2, and S3 are executed and are ended with RC=4, RC=0, RC=0; S4 is abended with S806, and S5 is flushed.

If you select a step restart from step S4 (after fixing the error causing the abend), steps S1, S2, and S3 will be simulated with return code 4, 0, 0, while S4 and S5 will be executed. Return code simulation guarantees that the //SIF statement check will be correctly evaluated by JES, allowing execution of S5. You have to select the step range from the EQQMERSL panel (STEP RESTART SELECTION LIST panel), as shown in EQQMERSL - Step restart selection list where the JCL used is the one of the previous example.

Figure 1. EQQMERSL - Step restart selection list
EQQMERSL ---------------- STEP RESTART SELECTION LIST -------- Row 1 of 5      
                                                                                
Primary commands:  GO  - to confirm the selection, END - to save it,           
                    CANCEL - to exit without saving, STEP -to show Step Info   
User Selection:    S -Start restart step E -Last restart step                  
                   X -Step excluded (simulated flushed)                        
                   F -Step excluded (simulated with specified RC)               
                   I -Step included if inside restart range,                    
                    otherwise simulated with specified RC.                      
                                                                                
                                                                                
Application           : APLICSIMONA       01/02/05 19.19                       
Operation             : CPU1 10                                                 
Jobname and jobid     : JOBSAMP           JOB00163                             
                                                                                
Best Restart Step     : S3               0003                                  
Current selected Step : S3               0003                                  
                                                                                
Usr Act Rest Step StepName ProcStep PgmName  Step      Step       Compl.       
Sel Sel      No                              Type      Status     Code         
'    I   Y    0001            S1    MYPROG   Normal    Executed   0004          
'    I   Y    0002            S2    IEFBR14  Normal    Executed   0000         
'    I   Y    0003            S3    IEFBR14  Normal    Executed   0000         
S    S   B    0004            S4    IEFBR15  Normal    Abended    S806        
'    I   N    0005            S5    IEFBR14  Normal    Flushed    FLUSH

EQQMERSL - Step restart selection list shows that step S4 is selected as the restart point (with the S row command), and the restarted job will end at step S5 (the end step defaults to the last step). The scope of the restart are steps 4 to 5.

To change the completion code values for the steps that will be simulated, do the following after setting the code value:
  • For steps outside the restart range, enter the I or F row command.
  • For steps inside the restart range, enter the F row command.

For example, to set code value 0008 for step S4, you must use row command F, while for step S2 you might use row command I.

The ‘Rest’ column shows if a step is restartable or not. Steps S4 and S5 are marked as not restartable because they follow the abended step S3. The logic used to decide this is described in the Steps that are not restartable section. Usually you cannot override suggested logic (that is, you can start from step S1, S2, and S3, but you cannot start from step S5) unless a specific keyword was specified in the Controller Initial statement file (see the RCLOPTS STEPRESCHK keyword for details).

The ‘Step Type’ column shows if this is a simulated, normal, or EQQCLEAN step. As this is the first run of the job, all steps are marked as Normal. To display the step name change table, enter the primary command STEP on the EQQMERSL panel. The EQQMERSI panel is displayed:

Figure 2. EQQMERSI - Step information list
EQQMERSI -------------- STEP INFORMATION LIST   ------------- Row 1 of 5      
                                                                             
Command ===>                    Scroll ===> PAGE                             
                                                                               
Expanded JCL can change original step names. It is a flat JCL built           
from JOBLOG removing the procedure calls and leaving only their               
steps. Steps inside procedures are always changed as the double               
name reference (e.g. STEP1.STEP2) is reduced to a single reference            
(e.g. STEP2). New StepName is only displayed if it was changed.               
                                                                                
Application           : APLICSIMONA  01/02/05 19.19                            
Operation             : CPU1 10                                                 
Jobname and jobid     : JOBSAMP           JOB00163                             
                                                                                
Step Old      Old      New                                                     
No   StepName ProcStep StepName PgmName                                        
0001          S1                MYPROG                                        
0002          S2                IEFBR14                                        
0003          S3                IEFBR14                                        
0004          S4                IEFBR15                                        
0005          S5                IEFBR14