R3_ACTIVATE_JOBS

Use the R3_ACTIVATE_JOBS script element to execute jobs that are scheduled in SAP under the control of the Automation Engine. The jobs that should start are selected from a list. The selection criteria are assigned in the form of parameters. The transaction that is used is SM37.

Tip: You can use PREP_PROCESS_FILE to search the output and define reactions.

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

  • R3_ACTIVATE_JOB[S]
    Executes jobs that are scheduled in SAP under the control of the AE

  • NAME=
    Selects one or several intercepted jobs on the basis of their names. Use this parameter together with the JOBCOUNT= parameter to clearly identify an individual SAP job. To select several jobs, you can use the * wildcard character, such as xxx*, for example.
    Format: script literal or AE name

  • JOBCOUNT=
    (Optional) Number of the SAP job. Use this parameter together with the NAME= parameter to clearly identify an individual SAP job
    Format: script literal

  • GROUP=
    (Optional) Selects jobs on the basis of groups such as xxx*, for example.
    Format: script literal or AE name
    Default value: "*"

  • USER=
    (Optional) Selects jobs on the basis of a user such as xxx*, for example.
    Format: script literal or AE name
    Default value: "*"

  • NOFOUND=
    (Optional) Action that should be taken if no jobs are found
    Format: script literal
    Allowed values:

    • NORMAL (default)
      Script execution continues, the AE job ends normally

    • ABEND
      Script execution stops, the AE job ends abnormally

  • ERROR=
    (Optional) Action that should be taken if one of the selected jobs ends abnormally
    Format: script literal
    Allowed values:

    • ABEND (default)
      Script execution stops, the AE job ends abnormally

    • IGNORE
      Script execution continues, the AE job ends normally

  • SEL[ECT]=
    (Optional) The selection applies once or permanently
    Format: script literal
    Allowed values:

    • ONCE (default)
      The number of selected jobs is retrieved once

    • EVERY
      The number of selected jobs is retrieved whenever a job is released. Therefore, released jobs can run in parallel.

  • START=
    (Optional) Defines whether the original job or a duplicate should start
    Format: script literal
    Allowed values:

    • ORIGINAL (default)

    • DUPLICATE

  • NEW_NAME=
    (Optional) Name of the job that should start as a duplicate
    Only use this parameter in combination with START=DUPLICATE as otherwise, this parameter will be ignored.
    Format: script literal

  • START_D[ATE]=
    (Optional) Start date for the selected scheduled jobs. If you use this parameter without the END_DATE= parameter, all scheduled jobs are selected and start with the start date you specify here.
    Format: script literal
    Date format: YYYYMMDD
    Default value: 20000101

  • START_T[IME]=
    (Optional) Start time for the selected scheduled jobs. If you use this parameter without the END_TIME= parameter, all scheduled jobs are selected and start with the specified start time. 11:59 PM is the applied end time in this case.
    Format: script literal
    Time format: HHMMSS
    Default value: 000000

  • END_D[ATE]=
    (Optional) End date for the selected scheduled jobs. Use the same date for this parameter AND the START_DATE= parameter if you want to select all jobs that are scheduled on this day.
    Format: script literal
    Date format: YYYYMMDD
    Default value: current date

  • END_T[IME]=
    (Optional) End time for the selected scheduled jobs.
    Format: script literal
    Time format: HHMMSS
    Default value: 235959

  • NO_DATE=
    (Optional) Applies to jobs that do not have a start date
    Format: script literal or AE name
    Allowed values:

    • "" (default)

    • X

  • TARGET_S[ERVER]=
    (Optional) Target system that the released SAP job should use.
    Format: script literal
    Allowed values:

    • KEEP (default)
      The target system that is defined in the original job is kept

    • ATTRIBUTE
      The target system that is defined in the host attributes of the job is used.

  • BEG_LOGLINES=
    (Optional) Determines the number of lines that should be added to the AE job report starting from the beginning of the SAP job log

  • END_LOGLINES=
    (Optional) Determines the number of lines that should be added to the AE job report starting from the end of the SAP job log
    Default value: The complete job log is used if neither END_LOGLINES nor BEG_LOGLINES are defined. If you define only one of these two parameters, the corresponding lines of the job log are read either from the beginning, or the end. No job log is added if you define the value 0 in both parameters.
    Allowed values: numbers

  • 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
      The spool list is requested. It is stored as a text file in the directory that is defined in the INI file of the SAP Agent with the parameter Download_dir= ([GLOBAL] section). For more information, see Agent SAP

      The name of the text 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 Registered Job Output.

Examples

The following example releases all jobs that have been scheduled by the user NI:

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

The second example selects and starts all jobs that are scheduled between 7/1/2020 12:00:00am and 7/2/2020 11:59:59pm.

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

The third example selects and starts all jobs that are scheduled between 7/1/2020 12:30:00pm and 7/2/2020 12:30:00pm.

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

  • R3_ACTIVATE_JOB[S]
    Executes jobs that are scheduled in SAP under the control of the AE

  • NAME=
    Selects one or several intercepted jobs on the basis of their names. Use it together with the JOBCOUNT parameter to clearly identify a unique SAP job. To select several jobs, you can use the * wildcard character, such as xxx*, for example.
    Format: script literal or AE name

  • JOBCOUNT=
    (Optional) Number of the SAP job
    Use it together with the NAME parameter to clearly identify a unique SAP job.
    Format: script literal

  • NOFOUND=
    (Optional) Action that should be taken if no jobs are found
    Format: script literal
    Allowed values:

    • NORMAL (default)
      Script execution continues, the AE job ends normally

    • ABEND
      Script execution stops, the AE job ends abnormally

  • ERROR=
    (Optional) Action that should be taken if one of the selected jobs ends abnormally
    Format: script literal
    Allowed values:

    • ABEND (default)
      Script execution stops, the AE job ends abnormally

    • IGNORE
      Script execution continues, the AE job ends normally

  • SEL[ECT]=
    (Optional) The selection applies once or permanently
    Format: script literal
    Allowed values:

    • ONCE (default)
      The number of selected jobs is retrieved once

    • EVERY
      The number of selected jobs is retrieved whenever a job is released. Therefore, released jobs can run in parallel.

  • START=
    (Optional) Defines whether the original job or a duplicate should start
    Format: script literal
    Allowed values:

    • ORIGINAL (default)

    • DUPLICATE

  • NEW_NAME=
    (Optional) Name of the job that should start as a duplicate
    Only use this parameter in combination with START=DUPLICATE as otherwise, this parameter will be ignored.
    Format: script literal

  • START_D[ATE]=
    (Optional) Start date for the selected scheduled jobs. If you use this parameter without the END_DATE= parameter, all scheduled jobs are selected and start with the start date you specify here.
    Format: script literal
    Date format: YYYYMMDD
    Default value: 20000101

  • START_T[IME]=
    (Optional) Start time for the selected scheduled jobs. If you use this parameter without the END_TIME= parameter, all scheduled jobs are selected and start with the specified start time. 11:59 PM is the applied end time in this case.
    Format: script literal
    Time format: HHMMSS
    Default value: 000000

  • END_D[ATE]=
    (Optional) End date for the selected scheduled jobs. Use the same date for this parameter AND the START_DATE= parameter if you want to select all jobs that are scheduled on this day.
    Format: script literal
    Date format: YYYYMMDD
    Default value: current date

  • END_T[IME]=
    (Optional) End time for the selected scheduled jobs.
    Format: script literal
    Time format: HHMMSS
    Default value: 235959

  • TARGET_S[ERVER]=
    (Optional) Target system that the released SAP job should use.
    Format: script literal
    Allowed values:

    • KEEP (default)

      The target system that is defined in the original job is kept

    • ATTRIBUTE
      The target system that is defined in the host attributes of the job is used.

  • MON[ITOR]=
    (Optional) The logging of status monitoring in the activation log.
    Format: script literal
    Allowed Values: NO (default) and YES

  • WAIT=
    (Optional) Waits for SAP job children to end
    Format: script literal or AE Name

    Allowed values:
    • NO (default)
      Does not wait for all children to end
    • YES
      Waits for all children to end. Children are logged in the activation report.
  • ABORTED=
    (Optional) Reaction to an abnormal end of SAP job children
    Format: script literal or AE name
    Allowed values:
    • YES (default)
      SAP job (parent) has aborted. The script does not continue and the AE job ends abnormally.
    • NO
      SAP job (parent) has not aborted. The script continues and the AE job ends normally. 
  • REPL[ICATE]=
    (Optional) Handles the children of intercepted jobs.
    Format: script literal
    Allowed values:
    • NO (default)
      There is no replication in the AE system.
    • YES
      The children of a job are replicated in the AE system. They are displayed in the Process Monitoring perspective. Statistical records and reports are created in the AE system.
  • BEG_LOGLINES=
    (Optional) Determines the number of lines that should be added to the AE job report starting from the beginning of the SAP job log
  • END_LOGLINES=
    (Optional) Determines the number of lines that should be added to the AE job report starting from the end of the SAP job log
    Default value: The complete job log is used if neither END_LOGLINES nor BEG_LOGLINES are defined. If you define only one of these two parameters, the corresponding lines of the job log are read either from the beginning, or the end. No job log is added if you define the value 0 in both parameters.
    Allowed values: numbers
  • 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
      The spool list is requested. It is stored as a text file in the directory that is defined in the INI file of the SAP Agent with the parameter Download_dir= ([GLOBAL] section). For more information, see Agent SAP

      The name of the text 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 Registered Job Output.

Example

The following example releases all scheduled jobs that have the name REORG_SPOOL

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

See also:

seealso

About SAP JCL