Automation Engine Script Guide > Ordered by Function > Activate Objects > SYS_STATE_JOB_ACTIVE

SYS_STATE_JOB_ACTIVE

Script Function: Checks if a job has already been activated

Syntax

SYS_STATE_JOB_ACTIVE([Job])

Syntax

Description/Format

Job

Name of a job
Format: AE name, script literal or script variable


Return codes

"Y" - The job is in a status with system return code < 1699 or 1701.
"N" - The job is in a status with system return code > 1699 and not 1701.
 

Comments

This script function checks whether or not the specified job is in a status with a system return codebelow 1699 or equals the return code 1701. If none of the two parameters has been specified, the function checks the object in which it is used.

The check is made when the script line which contains this function is processed. A negative result does not provide the information whether or not the object will be activated later. Thus, this function cannot be used to synchronize processes. The information it supplies about object states is only valid for a limited period of time.

When you specify the name of the own object (= the object that is used to process the script element), your system considers this and always returns the return code "Y".

Example

In the example, it is tested if a job is currently active and the result is passed to a script variable.

:SET &ACTIVE# = SYS_STATE_JOB_ACTIVE(MM.END.PROCESSING)

 

See also:

Script element Description

SYS_STATE_ACTIVE

Checks if an object has already been activated

SYS_STATE_JOBS_IN_GROUP

Returns the number of jobs that are registered in groups

SYS_STATE_JP_ACTIVE Checks if a workflow has already been activated

Script Elements - Activate Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function