R3_ACTIVATE_JOBS

Use the R3_ACTIVATE_JOBS script element to execute jobs scheduled in SAP under the control of the Automation Engine. Jobs to be started are selected from a list using the parameters described below.

Tip: Use PREP_PROCESS_FILE to search the output and define reactions. For more information, see PREP_PROCESS_FILE.

Transaction: SM37

This page includes the following:

AE Interface

Syntax

R3_ACTIVATE_JOB[S] NAME=...[,JOBCOUNT=...][,GROUP=...][,USER=...][,NOFOUND=...][,ERROR=...][,SELECT=...][,START=...][,NEW_NAME=...][,START_D[ATE]=...][,START_T[IME]=...][,END_D[ATE]=...][,END_T[IME]=...][,NO_DATE=...][,TARGET_S[ERVER]=...][,BEG_LOGLINES=...][,END_LOGLINES=...][,GET_SPOOL=...]

Parameters

Parameter Description Format Allowed Values Default Value
NAME= Selects one or more jobs by name. Use together with JOBCOUNT= to uniquely identify a specific SAP job. Wildcard characters such as xxx* are supported. Script literal or AE name n.a. n.a.
JOBCOUNT=

(Optional)

Number of the SAP job. Use together with NAME= to uniquely identify a specific SAP job. Script literal n.a. n.a.
GROUP=

(Optional)

Selects jobs by group. Wildcard characters such as xxx* are supported. Script literal or AE name n.a. *
USER=

(Optional)

Selects jobs by user. Wildcard characters such as xxx* are supported. Script literal or AE name n.a. *
NOFOUND=

(Optional)

Handling if no jobs are found Script literal
  • NORMAL — The script continues; the AE job ends normally
  • ABEND — The script stops; the AE job ends abnormally
NORMAL
ERROR=

(Optional)

Handling if one of the selected jobs ends abnormally Script literal
  • ABEND — The script stops; the AE job ends abnormally
  • IGNORE — The script continues; the AE job ends normally
ABEND
SEL[ECT]=

(Optional)

Controls whether the job selection is calculated once or recalculated each time a job is released Script literal
  • ONCE — The number of selected jobs is calculated once
  • EVERY — The number of selected jobs is recalculated each time a job is released, allowing released jobs to run in parallel
ONCE
START=

(Optional)

Controls whether the original job or a duplicate starts Script literal
  • ORIGINAL — The original job starts
  • DUPLICATE — A duplicate of the job starts
ORIGINAL
NEW_NAME=

(Optional)

Name of the job that starts as a duplicate. Use only together with START=DUPLICATE; this parameter is ignored otherwise. Script literal n.a. n.a.
START_D[ATE]=

(Optional)

Start date for selecting scheduled jobs. If specified without END_DATE=, all scheduled jobs starting from this date are selected. Script literal n.a. 20000101 (YYYYMMDD)
START_T[IME]=

(Optional)

Start time for selecting scheduled jobs. If specified without END_TIME=, all scheduled jobs starting from this time are selected, with 23:59 as the applied end time. Script literal n.a. 000000 (HHMMSS)
END_D[ATE]=

(Optional)

End date for selecting scheduled jobs. Specify the same date as START_DATE= to select all jobs scheduled on that day. Script literal n.a. Current date (YYYYMMDD)
END_T[IME]=

(Optional)

End time for selecting scheduled jobs Script literal n.a. 235959 (HHMMSS)
NO_DATE=

(Optional)

Selects jobs that do not have a start date Script literal or AE name
  • "" — Not selected
  • X — Selected
""
TARGET_S[ERVER]=

(Optional)

Target system to use for the released SAP job Script literal
  • KEEP — The target system defined in the original job is used
  • ATTRIBUTE — The target system defined in the host attributes of the job is used
KEEP
BEG_LOGLINES=

(Optional)

Number of lines to transfer from the beginning of the SAP job log to the AE job report.
Note: If neither BEG_LOGLINES= nor END_LOGLINES= is specified, the complete job log is transferred. If only one is specified, that value is applied. Specifying 0 for both parameters transfers no job log.
Number n.a. n.a.
END_LOGLINES=

(Optional)

Number of lines to transfer from the end of the SAP job log to the AE job report.
Note: If neither BEG_LOGLINES= nor END_LOGLINES= is specified, the complete job log is transferred. If only one is specified, that value is applied. Specifying 0 for both parameters transfers no job log.
Number n.a. n.a.
GET_SPOOL=

(Optional)

Controls whether the spool list of the started job is requested.

When NO: The spool list is not requested.

When YES: The spool list is requested and stored as a text file in the directory defined by the Download_dir= parameter ([GLOBAL] section) of the SAP Agent INI file. The filename is structured as follows: <SAP job count>_<step number>_<spool number>.txt. The file is also registered as job output in the AE job. For more information, see Agent SAP and Registered Job Output.

Script literal
  • NO — The spool list is not requested
  • YES — The spool list is requested and stored as a text file
NO

Examples

The following example releases all jobs scheduled by the user NI.

R3_ACTIVATE_JOBS NAME='*',GROUP='*',USER='NI'

The following example selects and starts all jobs scheduled between July 1, 2020 00:00:00 and July 2, 2020 23:59:59.

R3_ACTIVATE_JOBS NAME='*',GROUP='*',USER='SUPPORT',START_DATE='20200701',END_DATE='20200702'

The following example selects and starts all jobs scheduled between July 1, 2020 12:30:00 and July 2, 2020 12:30:00.

R3_ACTIVATE_JOBS NAME='*',GROUP='*',USER='SUPPORT',START_DATE='20200701',END_DATE='20200702'

Standard Interface

Syntax

R3_ACTIVATE_JOB[S] NAME=...[,JOBCOUNT=...][,NOFOUND=...][,ERROR=...][,SELECT=...][,START=...][,NEW_NAME=...][,START_D[ATE]=...][,START_T[IME]=...][,END_D[ATE]=...][,END_T[IME]=...][,TARGET_S[ERVER]=...][,MON[ITOR]=...][,WAIT=...][,ABORTED=...][,REPL[ICATE]=...][,END_LOGLINES=...][,GET_SPOOL=...]

Parameters

Parameter Description Format Allowed Values Default Value
NAME= Selects one or more jobs by name. Use together with JOBCOUNT= to uniquely identify a specific SAP job. Wildcard characters such as xxx* are supported. Script literal or AE name n.a. n.a.
JOBCOUNT=

(Optional)

Number of the SAP job. Use together with NAME= to uniquely identify a specific SAP job. Script literal n.a. n.a.
NOFOUND=

(Optional)

Handling if no jobs are found Script literal
  • NORMAL — The script continues; the AE job ends normally
  • ABEND — The script stops; the AE job ends abnormally
NORMAL
ERROR=

(Optional)

Handling if one of the selected jobs ends abnormally Script literal
  • ABEND — The script stops; the AE job ends abnormally
  • IGNORE — The script continues; the AE job ends normally
ABEND
SEL[ECT]=

(Optional)

Controls whether the job selection is calculated once or recalculated each time a job is released Script literal
  • ONCE — The number of selected jobs is calculated once
  • EVERY — The number of selected jobs is recalculated each time a job is released, allowing released jobs to run in parallel
ONCE
START=

(Optional)

Controls whether the original job or a duplicate starts Script literal
  • ORIGINAL — The original job starts
  • DUPLICATE — A duplicate of the job starts
ORIGINAL
NEW_NAME=

(Optional)

Name of the job that starts as a duplicate. Use only together with START=DUPLICATE; this parameter is ignored otherwise. Script literal n.a. n.a.
START_D[ATE]=

(Optional)

Start date for selecting scheduled jobs. If specified without END_DATE=, all scheduled jobs starting from this date are selected. Script literal n.a. 20000101 (YYYYMMDD)
START_T[IME]=

(Optional)

Start time for selecting scheduled jobs. If specified without END_TIME=, all scheduled jobs starting from this time are selected, with 23:59 as the applied end time. Script literal n.a. 000000 (HHMMSS)
END_D[ATE]=

(Optional)

End date for selecting scheduled jobs. Specify the same date as START_DATE= to select all jobs scheduled on that day. Script literal n.a. Current date (YYYYMMDD)
END_T[IME]=

(Optional)

End time for selecting scheduled jobs Script literal n.a. 235959 (HHMMSS)
TARGET_S[ERVER]=

(Optional)

Target system to use for the released SAP job Script literal
  • KEEP — The target system defined in the original job is used
  • ATTRIBUTE — The target system defined in the host attributes of the job is used
KEEP
MON[ITOR]=

(Optional)

Controls whether status monitoring is logged in the activation report Script literal
  • NO — Status monitoring is not logged
  • YES — Status monitoring is logged
NO
WAIT=

(Optional)

Controls whether the script waits for SAP job child processes to end Script literal or AE name
  • NO — Does not wait for child processes to end
  • YES — Waits for all child processes to end; children are logged in the activation report
NO
ABORTED=

(Optional)

Handling if a SAP job child process ends abnormally Script literal or AE name
  • YES — The script stops; the AE job ends abnormally
  • NO — The script continues; the AE job ends normally
YES
REPL[ICATE]=

(Optional)

Controls replication of child processes of activated jobs in the AE system Script literal
  • NO — No replication takes place
  • YES — Child processes are replicated in the AE system and displayed in the Process Monitoring perspective; statistical records and reports are generated
NO
BEG_LOGLINES=

(Optional)

Number of lines to transfer from the beginning of the SAP job log to the AE job report.
Note: If neither BEG_LOGLINES= nor END_LOGLINES= is specified, the complete job log is transferred. If only one is specified, that value is applied. Specifying 0 for both parameters transfers no job log.
Number n.a. n.a.
END_LOGLINES=

(Optional)

Number of lines to transfer from the end of the SAP job log to the AE job report.
Note: If neither BEG_LOGLINES= nor END_LOGLINES= is specified, the complete job log is transferred. If only one is specified, that value is applied. Specifying 0 for both parameters transfers no job log.
Number n.a. n.a.
GET_SPOOL=

(Optional)

Controls whether the spool list of the started job is requested.

When NO: The spool list is not requested.

When YES: The spool list is requested and stored as a text file in the directory defined by the Download_dir= parameter ([GLOBAL] section) of the SAP Agent INI file. The filename is structured as follows: <SAP job count>_<step number>_<spool number>.txt. The file is also registered as job output in the AE job. For more information, see Agent SAP and Registered Job Output.

Script literal
  • NO — The spool list is not requested
  • YES — The spool list is requested and stored as a text file
NO

Examples

The following example releases all scheduled jobs named REORG_SPOOL.

R3_ACTIVATE_JOBS NAME='REORG_SPOOL',NOFOUND='ABEND'

See also: