Script Function: Repeats the execution of a task.
RESTART_UC_OBJECT (Object Name, Reference RunID, [Restart Point], [Flags], [Queue])
Syntax |
Description/Format |
---|---|
Object Name |
Name of the object. |
Reference RunID |
RunID to which the restart refers, or the keyword LAST
for the task's last execution. You cannot repeat a task that has already been restarted because traces would become very difficult. Therefore, the RunID must refer to an original execution. The latest original execution is used in combination with the keyword LAST. |
Restart Point |
Point in the script from which execution should be restarted. This parameter can only be specified if you have specified restart points using :RESTART in the task that should be repeated. The complete script is processed if this parameter is not used. |
Flags |
Instructions for the task execution. Allowed values: You can specify several flags that must be separated by commas. The whole term must be written in inverted commas if these flags are named and no script variables are used. The allowed values refer to the options that are also available for manual restarts in the dialog "Execute...". |
Queue |
Specification of a particular Queue object that should be used for restarting the task. The task automatically starts in the Client Queue (CLIENT_QUEUE) if no queue has been specified. |
Return code |
---|
"0" - Task restart was successful. |
This script function can be used to restart tasks that have already been executed.
A task can also repeat itself if this script function is called in Post Process. Note that this can result in an infinite loop.
Note that choosing one of the four test options as Flags ("GEN_JCL", "ORIGINAL_SCRIPT", "VAR_MOD" or "ATT_MOD") results in the job being aborted with :STOP. This is because the default value "N" (=No) is used as answer for the question "Do you want to start this job?".
To execute a restart with one or all of the four test options as flags successfully, please use the UserInterface, as described in the section "Execution with Options".
The RunID of the task that should be re-executed is assigned to this script function with the parameter Reference RunID. The key word LAST can also be used in order to restart a task's latest execution.
You can also specify a restart point that should be considered when the task is re-executed. The task starts but it is processed from the specified restart point. Flags are also optional and affect the task's execution.
The script statement :ON_ERROR can be used to determine the reaction to errors. They can then be analyzed using the script functions for error handling. Script processing continues but can also be canceled if necessary.
This script statement has the effect that all the script's open transactions are written to the AE databaseA database is an organized collection of data including relevant data structures..
The following example repeats a job's the last execution. The generated JCL and the modification of variables are output in an activation log. The job waits in the Activity Window until it is manually released.
:SET &RET# = RESTART_UC_OBJECT ("JOBS.SYSTEM.CHECK",LAST,,"GEN_JCL,VAR_MOD,MAN_RELEASE")
See also:
Script element | Description |
---|---|
:GENERATE |
Controls the processing of script lines during the execution of a script. |
Determines the reaction to certain errors and messages of script elements. |
|
Sets restart points in an executable object. |
|
SYS_ACT_RESTART |
Retrieves whether the object has been activated in restart mode. |
SYS_ACT_RESTART_ME_NR |
Returns the run number (RunID) of an object that has been activated in restart mode. |
SYS_LAST_RESTART_POINT |
Supplies the name of the previous restart point in the script. |
SYS_LAST_RESTART_TEXT |
Supplies the text of the previous restart point as defined in the script. |
SYS_RESTART_POINT |
Supplies the restart point from which the object is executed. |
Script Elements - Activate Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function