BW_RESTART_CHAIN

Use this script element to continue an interrupted process chain. When the process chain continues, it is monitored until it ends and its log is stored in the activation report. In addition, you can store individual process logs or process logs of background jobs by using the BW_RESTART_CHAIN script element.

Transaction: RSA1

Syntax

BW_RESTART_CHAIN

    ID=...
    ,LOGID=...
    [,NOFOUND=...]
    [,ERROR=...]
    [,PROCESSLOGS=...]
    [,JOBLOGS=...]
    [,LONGTEXT=...]
    [,REPLICATE=...]
    [,GET_SPOOL=...] 
    [,COLLECTLOGS=...]

Parameters

  • BW_RESTART_CHAIN
    Continues an interrupted process chain

  • ID=
    Technical designation of the process chain
    Format: script literal
  • LOGID=
    25-digit log ID
    Format: script literal
  • Tip: Use PREP_PROCESS_REPORT to retrieve the log ID from an AE job report.

  • NOFOUND=
    (Optional) Handling if the process chain cannot be found
    Format:
    script literal
    Allowed values:
    • NORMAL (default)
      The script continues, the AE job ends normally
    • ABEND
      The script aborts, the AE job ends abnormally
  • ERROR=
    (Optional) Handling if the process chain ends abnormally. This parameter is useful to restart process chains or their child processes with the advantage being that the job does not end and processing in a parent, such as a workflow, continues.
    Format:
    script literal
    Allowed values:
    • ABEND (default)
      The script aborts, the AE job ends abnormally
    • IGNORE
      The script continues, the AE job ends normally
    • SUSPEND
      The job remains active until a restart of the process chain or its child processes has been successful, or the job has been canceled manually.
  • PROCESSLOGS=
    (Optional) Output of the individual process logs of a process chain
    Format: script literal
    Allowed values:
    • YES (default)
      Individual process logs are added to the process chain log
    • NO
      Only the process chain log is output
    • ERROR
      Individual process logs are output only in case of error
  • JOBLOGS=
    (Optional) Output of the process logs of the background job
    Format: script literal
    Allowed values:
    • YES (default)
      Process logs of background jobs are output
    • NO
      Process logs of background jobs are not output
    • ERROR
      Process logs of background jobs are only output if an error occurs
  • LONGTEXT=
    (Optional) Output of the long text (diagnostics text) of a log message
    Format: script literal
    Allowed values:
    • ERROR (default)
      The long text of the log message is only output if an error occurs
    • YES
      The long text of the log message is output
    • NO
      The long text of the log message is not output
  • REPLICATE=
    (Optional) Handling of the children of a process chain
    Format: script literal

    Allowed values:
    • NO (default)
      No replication takes place in the AE system.
    • YES
      Replicates the children of a job in the AE system. The children are displayed in the Process Monitoring perspective. Statistical records and reports are also generated in the AE system.
    • ALL
      Replicates all child processes of a job in the AE system including the ones that were skipped. The child processes are shown in the Process Monitoring perspective. Statistical records and reports are also generated in the AE system.
  • GET_SPOOL=
    (Optional) Requests the spool list of the started job
    Format: script literal
    Allowed values:
    • NO (default)
      The spool list is not requested
    • YES
      Requests the spool list
      The spool list is stored as a text file in the directory that has been defined in the INI file of the SAP Agent, with the parameter Download_dir= ([GLOBAL] section). The name of this file is structured as follows:
      <SAP job count>_<step number>_<spool number>.txt
      This file is also registered as job output in the AE job.
      For more information, see Agent SAP and Registered Job Output.
  • COLLECTLOGS=
    (Optional) Writes the reports of the activated process chain's child processes to the job report
  • The reports of replicated child processes are by default available in the job report AND the task of the child process. Therefore, this information is redundant in the job and you can decide not to assume this information here.
    Allowed values:

    • YES (default)
      Logs of child processes are written to the job report
    • NO
      Logs of the child processes of the process chain are not written to the job report
    • Note: The reports of the child processes are not available if you specify NO in the REPLICATE and COLLECTLOGS parameters .

Examples

This example serves to determine whether the ZSBB1 process chain has been interrupted in a post script of a job by using the error number. If so, the 25-digit log ID is saved in a variable.

:SET &HND# = PREP_PROCESS_REPORT(,,PLOG,'*U2004111*','COL=DELIMITER',"DELIMITER=@'@")
:
SET &LOGID# = ''

:
PROCESS &HND#
:   
SET &LOGID# = GET_PROCESS_LINE(&HND#,4)
:
ENDPROCESS

:
IF &LOGID# <> ''
:   
PUT_VAR VARA.CHAINS,'ZSBB1',&LOGID#
:
ENDIF

An additional job reads the log ID from the variable and restarts the process chain to continue processing.

:SET &LOGID# = GET_VAR(VARA.CHAINS,ZSBB1)
BW_RESTART_CHAIN ID='ZSBB1',LOGID='&LOGID#',ERROR='ABEND',NOFOUND='NORMAL'