Using Orchestration Query Language

You can use the essential Orchestration Query Language (OQL) keywords and syntax to effectively write queries.

You can monitor the IBM® Workload Scheduler production plan environment, both distributed and z/OS, by using the OQL, which applies to REST API V2, Orchestration CLI, and the Orchestration Monitor of the Dynamic Workload Console. Write queries for items in your database and retrieve required results easily and quickly by using the OQL syntax.

An OQL query begins with an expression, which is composed of different conditions, known as queryTerms. A queryTerm is the minimum condition of a OQL construction, for example jobStreamName = test1.

QueryTerms include three main elements: a field, a comparison_operator, and a value. The fields and the values of the query are case-sensitive.

The field must begin with a letter. After the first letter, the field can contain the following characters:

  • 0 - 9
  • a - z
  • A - Z
  • _
  • -
  • .
You can express the value in one of the following ways:
  • Integers, both positive and negative.
  • Strings in single quotation marks (').
  • Duration, based on ISO 8601 standard. Duration is expressed in P[n]Y[n]M[n]DT[n]H[n]M[n]S format, where [n] replaces the value of each time and date element. For example, to express a duration of 4 hours and 20 seconds, the format to use is PT4H20S.
  • Instant, based on ISO 8601 standard. Instant is expressed in YYYY-MM-DDThh:mm:ss.milliseconds format. For example, to express the instant for December 1st, 2025 at 11 PM, the format to use is 2025-12-01T23:00:00.000Z.
  • Identifier (ID) based on Universally Unique Identifier (UUID) standard.

OQL syntax keywords and comparison operators

The following table details OQL keywords and comparison operators, both of which are essential for constructing effective queries.

Table 1. OQL syntax keywords
Keywords Description
AND Returns the results that satisfy all the conditions separated by AND. It is case insensitive.
OR Returns the results that satisfy at least one of the conditions separated by OR. It is case insensitive.
( Opens a priority expression.
) Closes a priority expression.
[ Opens a list.
] Closes a list.
= Returns all the elements equal to the specified element. Numbers, strings, or one of these keywords can follow the keyword: true, false, or null.
!= Returns all the elements different from the given one. Numbers, strings, or one of these keywords can follow the keyword: true, false, or null.
<= Returns all the elements that are less than or equal to the specified keyword. Only numbers or strings can follow.
>= Returns all the elements that are greater than or equal to the specified keyword. Only numbers or strings can follow.
< Returns all the elements that are less than the specified keyword. Only numbers or strings can follow.
> Returns all the elements that are greater than the specified keyword. Only numbers or strings can follow.
IN Returns items that the specified list includes.
NOT IN Returns items that the specified list does not include.
LIKE Returns elements that match the specified pattern. The accepted characters are as follows:
  • @: matches all characters.
  • ?: matches a single character in a specific position.
NOT LIKE Returns elements that do not match the specified pattern. The accepted characters are as follows:
  • @: matches all characters.
  • ?: matches a single character in a specific position.
ORDER BY Orders the query results according to the specified fields. You can use the keyword at the end of the construction. By default, the field is sorted in ascending order. The accepted values are as follows:
  • ASC: Sorts the results in ascending order.
  • DESC: Sorts the results in descending order.
, Separates values inside a list.
. Specifies a subfield of an item.
true Represents the Boolean value true.
false Represents the Boolean value false.
null Represents the null value.

OQL syntax fields for workstations

The table below provides a comprehensive list and description of OQL fields that apply to workstations.
Note: OQL fields are case-sensitive; therefore, adherence to the exact capitalization and spelling is mandatory.

Unless specified, the fields and the values listed in the table apply both to distributed and z/OS environments.

Table 2. OQL syntax fields for workstation
Field name Description
activeFlags The flags of the workstation. Supported values are:
AUTOMATION|WAIT|VIRTUAL|JOB_SETUP|WTO|zCENTRIC|DYNAMIC|STARTED_TASK|PENDING_OFFLINE|CONTROL_ON_SERVERS
Example:
activeFlags LIKE '@'
activeStates The statuses of the workstation. Supported values are:
LINKED|UNLINKED|FULLY_LINKED|NOT_APPLICABLE
FULLY_LINKED|LINKED|UNLINKED|WS_STATUS_ACTIVE|WS_STATUS_OFF|WS_STATUS_FAILED|WS_STATUS_UNKNOWN
Example:
activeStates IN  ['LINKED', 'FULLY_LINKED']
available The workstation is flagged as available. Supported values are true or false.
Example:
available IN ['true']
description The description of the workstation.
Example:
description IN ['General Workstation']
domainName The name of the domain within which the workstation is hierarchically organized.
Example:
domainName != 'MASTERDM'
folder The name of the folder where the workstation is saved.
Example:
folder LIKE '/@A/'
id The identifier of the workstation.
Example:
id = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
jobmanUp Identifies whether the agent is running or not. Supported values are true or false.
Example:
jobmanUp = true
name The name of the workstation.
Example:
name = 'wksrome'
remoteEngineType The type of remote engine on which the current remote workstation is defined. Supported values are Z for z/OS engines, and D for distributed engines.
Example:
remoteEngineType LIKE '@
reporting The type of reporting. Supported values are:
AUTOMATIC|MANUAL_START_STOP|MANUAL_COMPLETION_ONLY|NON_REPORTING
Example:
reporting LIKE 'AUTOMATIC'
resource1Info.usedForControl The job must be submitted only if the requested resource amount is available. Supported values are true or false.
Example:
resource1Info.usedForControl IN ['true']
resource2Info.usedForControl The job must be submitted only if the requested resource amount is available. Supported values are true or false.
Example:
resource2Info.usedForControl IN ['false']
resource2Info.usage The type of usage defined for resource 2. Supported values are:
PLANNING|CONTROL|PLANNING_AND_CONTROL|NEITHER_PLANNING_NOR_CONTROL
Example:
resource2info.usage IN ['NEITHER_PLANNING_NOR_CONTROL']
type The type of workstation. Supported values are:
AGENT|POOL|DYNAMIC_POOL|REMOTE_ENGINE|MANAGER|FTA|XA|SA|WORKLOAD_BROKER|DOMAIN_MANAGER
GENERAL|REM_ENG|COMPUTER|PRINTER
Example:
type IN ['FTA']

OQL syntax fields for job streams

The table below provides a comprehensive list and description of OQL fields that apply to job streams.
Note: OQL fields are case-sensitive; therefore, adherence to the exact capitalization and spelling is mandatory.

Unless specified, the fields and the values listed in the table apply both to distributed and z/OS environments.

Table 3. OQL syntax fields for job stream
Field name Description
aliasJobStreamName The alias name of the job stream.
Example:
aliasJobStreamName LIKE '@rome'
commonStatus The external status of the job stream in plan. The supported values are:
WAITING|READY|RUNNING|SUCCESSFUL|ERROR|CANCELED|HELD|UNDECIDED|BLOCKED|SUPPRESS
WAITING|READY|RUNNING|SUCCESSFUL|ERROR|CANCELED|HELD|UNDECIDED|SUPPRESS
Example:
commonStatus IN ['ERROR','BLOCKED']
compositeStatus.status The internal status of the job stream in plan. Supported values are:
HOLD|READY|FENCE|INTRO|FAIL|EXEC|WAIT|SUPPR|END|SUCC|SUCCP|ABEND|CANCL|CANCLP|ABENP|PEND|SUSP|STUCK|EXTRN
WAIT|COMPLETE|ERROR|STARTED|UNDECIDED|DELETED
Example:
compositeStatus.status NOT IN ['SUCC','ABEND','FAIL']
dependencies.dependencyStatus The status of the job stream dependency. Supported values are:
SATISFIED|UNSATISFIED|UNDECIDED
Example:
dependencies.dependencyStatus = 'SATISFIED'
dependencies.jobId The identifier of the job instance on which the job stream depends.
Example:
dependencies.jobId = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
dependencies.folderOriginalName The name of the folder where the job dependency is saved.
Example:
dependencies.folderOriginalName NOT LIKE '@JS_@'
dependencies.jobStreamName

For dependencies on jobs, the name of the job stream to which the job belongs.

For dependencies on job streams, the name of the job stream.

Example:
dependencies.jobStreamName LIKE '?a'
dependencies.jobName The name of the job on which the job stream depends.
Example:
dependencies.jobName LIKE '@job1'
dependencies.jobStreamFolder

For dependencies on jobs, the name of the folder of the job stream to which the job belongs.

For dependencies on job streams, the name of the folder of the dependent job stream.

Example:
dependencies.jobStreamFolder NOT LIKE '/@root/'
dependencies.jobStreamId

For dependencies on jobs, the id of the job stream to which the job belongs.

For dependencies on job streams, the id of the dependent job stream.

Example:
dependencies.jobStreamId = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
dependencies.jobStreamName

For dependencies on jobs, the name of the job stream to which the job belongs.

For dependencies on job streams, the name of the dependent job stream.

Example:
dependencies.jobStreamName LIKE '@js_exec'
dependencies.jobStreamWorkstation

For dependencies on jobs, the name of the workstation of the job stream to which the job belongs.

For dependencies on job streams, the name of the workstation of the dependent job stream.

Example:
dependencies.jobStreamWorkstation LIKE '@wks_rome@'
dependenciesStats.numberOfDependencies The number of dependencies of the job stream. Supported operators are = and !=.
Example:
dependenciesStats.numberOfDependencies = '3'
dependenciesStats.numberOfFileDependencies The number of dependencies of the job stream of type File. Supported operators are = and !=.
Example:
dependenciesStats.numberOfFileDependencies = '1'
dependenciesStats.numberOfInternetworkDependencies Number of dependencies of the job stream of type Internetwork dependency. Supported operators are = and !=.
Example:
dependenciesStats.numberOfInternetworkDependencies != '10'
dependenciesStats.numberOfJobDependencies The number of job dependencies of the job stream. Supported operators are = and !=.
Example:
dependenciesStats.numberOfJobDependencies != '7'
dependenciesStats.numberOfJobStreamDependencies The number of job stream dependencies of the job stream. Supported operators are = and !=.
Example:
dependenciesStats.numberOfJobStreamDependencies = '4'
dependenciesStats.numberOfPromptDependencies The number of dependencies of the job stream of type Prompt. Supported operators are = and !=.
Example:
dependenciesStats.numberOfPromptDependencies != '9'
dependenciesStats.numberOfResourceDependencies The number of dependencies of the job stream of type Resource. Supported operators are = and !=.
Example:
dependenciesStats.numberOfResourceDependencies = '3'
dependenciesStats.numberOfUnresolvedDependencies The number of dependencies of the job stream that have not been satisfied. Supported operators are = and !=.
Example:
dependenciesStats.numberOfUnresolvedDependencies != '8'
folder The name of the folder within which the job stream is saved.

Example:

folder ='/JSFOLDER'
folderId The identifier of the folder within which the job stream is saved.
Example:
folderId = 'be11g38a-0u7m-5f1d-5594-458d8d0d6541'
id The identifier of the job stream.
Example:
id = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
jobs.dependencies.jobStreamId The identifier of the job stream to which the dependency of the job belongs.
Example:
jobs.dependencies.jobStreamId = 'ca15f26a-0e9b-3cpl-5594-999d8d0d3639'
jobStreamStats.numberOfAbendedJob The number of jobs in ABEND status within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfAbendedJob != '8'
jobStreamStats.numberOfCurrentNodes The number of current nodes within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfCurrentNodes = '2'
jobStreamStats.numberOfExecutingJob The number of jobs that are currently running within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfExecutingJob != '6'
jobStreamStats.numberOfFailedJob The number of jobs that are in FAIL status within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfFailedJob = '1'
jobStreamStats.numberOfJob The total amount of jobs within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfJob != '3'
jobStreamStats.numberOfNotRunningJob The number of jobs that are currently not running within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfNotRunningJob = '10'
jobStreamStats.numberOfSkelJob The number of jobs in SKEL status within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfSkelJob = '1'
jobStreamStats.numberOfSuccessfullJob The number of jobs in SUCCESS status within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfSuccessfullJob != '7'
jobStreamStats.numberOfUndecidedJob The number of jobs in unknown status within the job stream. Supported operators are = and !=.
Example:
jobStreamStats.numberOfUndecidedJob = '1'
jsDefinitionFlags.carriedForward The job stream is flagged as carried forward. Supported values are true or false.
Example:
jsDefinitionFlags.carriedForward = false
jsOptions.carryForward The job stream is to be carried forward. Supported values are true or false.
Example:
jsOptions.carryForward = true
jsOptions.monitored The job stream is to be monitored. Supported values are true or false.
Example:
jsOptions.monitored = false
key The complete key that identifies the job stream.
Example:
key LIKE '@jskey'
limit The limit value set for the job stream.
Example:
limit > '1' AND limit <= '3'
name The name of the job stream.
Example:
name NOT LIKE '@JS@'
occurrenceToken The unique token that identifies the job stream.
occurrenceToken IN ['e079702a9547afc2']
originalJobStreamName The name of the job stream before any change was performed.
Example
originalJobStreamName NOT LIKE 'job@'
origPriority The original priority value set for the job stream.
Example:
origPriority = '10'
pendingPredecessor The job stream has predecessor instances that are pending. Supported values are true or false.
Example:
pendingPredecessor = false
priority The priority value set for the job stream.
Example:
priority = '101'
schedTime The scheduled time of the job stream.
Example:
schedTime >= '2025-03-01T00:00:00.000Z'
timeInfo.actualEndTime The time at which the job stream ended, that is the real end time.
Example:
timeInfo.actualEndTime < '2025-03-02T10:35:22.000Z'
timeInfo.actualStartTime The time at which the job stream started, that is the real start time.
Example:
timeInfo.actualStartTime > '2025-02-27T11:15:00.000Z'
timeInfo.elapsedTime The elapsed time of the job stream, that is the real duration. Supported operators are = and !=.
Example:
timeInfo.elapsedTime != 'PT6H3S'
timeInfo.estimatedDuration The estimated duration of the job stream. Supported operators are = and !=.
Example:
timeInfo.estimatedDuration = 'PT9H45S'
timeRestrictions.deadlineTime The time within which the job stream should complete.
Example:
timeRestrictions.deadlineTime != '2025-09-13T09:00:00.000Z'
timeRestrictions.startTime The start time set for the job stream.
Example:
timeRestrictions.startTime > '2025-04-27T10:15:00.000Z'
timeRestrictions.untilTime The latest time the job stream can be launched.
Example:
timeRestrictions.untilTime != '2025-02-27T11:35:16.000Z'
workstation The workstation where the job stream runs.
Example:
workstation = '/WSFOLDER/WS'

OQL syntax fields for jobs

The table below provides a comprehensive list and description of OQL fields that apply to job streams.
Note: OQL fields are case-sensitive; therefore, adherence to the exact capitalization and spelling is mandatory.

Unless specified, the fields and the values listed in the table apply both to distributed and z/OS environments.

Table 4. OQL syntax fields for jobs
Field name Description
dependencies.dependencyStatus The status of the job dependency. Supported values are:
SATISFIED|UNSATISFIED|UNDECIDED
Example:
dependencies.dependencyStatus != 'UNDECIDED'
dependencies.jobId The identifier of the job instance on which the job depends.
Example:
dependencies.jobId = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
dependencies.jobKey.name The name of the job dependency.
Example:
dependencies.jobKey.name NOT LIKE '@JS_@'
dependencies.jobStreamFolder

For dependencies on jobs, the name of the folder of the job stream to which the job belongs.

For dependencies on job streams, the name of the folder of the dependent job stream.

Example:
dependencies.jobStreamFolder = '/folder/js'
dependencies.jobStreamId

For dependencies on jobs, the id of the job stream to which the job belongs.

For dependencies on job streams, the id of the dependent job stream.

Example:
dependencies.jobStreamId = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
dependencies.jobStreamName

For dependencies on jobs, the name of the job stream to which the job belongs.

For dependencies on job streams, the name of the job stream.

Example:
dependencies.jobStreamName LIKE 'J?S@'
dependencies.jobStreamWorkstation

For dependencies on jobs, the name of the workstation of the job stream to which the job belongs.

For dependencies on job streams, the name of the workstation of the dependent job stream.

Example:
dependencies.jobStreamWorkstation LIKE 'wks_@'
dependenciesStats.numberOfFileDependencies The number of dependencies of the job of type File. Supported operators are = and !=.
Example:
dependenciesStats.numberOfFileDependencies = '2'
dependenciesStats.numberOfInternetworkDependencies Number of dependencies of the job of type Internetwork dependency. Supported operators are = and !=.
Example:
dependenciesStats.numberOfInternetworkDependencies != '4'
dependenciesStats.numberOfJobDependencies The number of job dependencies of the job. Supported operators are = and !=.
Example:
dependenciesStats.numberOfJobDependencies = '3'
dependenciesStats.numberOfJobStreamDependencies The number of job stream dependencies of the job. Supported operators are = and !=.
Example:
dependenciesStats.numberOfJobStreamDependencies != '8'
dependenciesStats.numberOfPromptDependencies The number of dependencies of the job of type Prompt. Supported operators are = and !=.
Example:
dependenciesStats.numberOfPromptDependencies = '1'
dependenciesStats.numberOfResourceDependencies The number of dependencies of the job of type Resource. Supported operators are = and !=.
Example:
dependenciesStats.numberOfResourceDependencies != '5'
dependenciesStats.numberOfUnresolvedDependencies The number of dependencies of the job that have not been satisfied. Supported operators are = and !=.
Example:
dependenciesStats.numberOfUnresolvedDependencies = '2'
folder The name of the folder within which the job is saved.
Example:
folder LIKE '/@A@'
folderId The identifier of the folder within which the job is saved.
Example:
folderId = 'be11g38a-0u7m-5f1d-5594-458d8d0d6541'
id The identifier of the job.
Example:
id = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
jobDefinition.isCommand The job definition is a command. Supported values are true if the job definition is a command, or false if the job definition is a script file.
Example:
jobDefinition.isCommand = true
jobDefinition.key.name The name of the job definition.
Example:
jobDefinition.key.name LIKE '@jobdef1_'
jobDefinition.recoveryOption The recovery options set for the job definition. Supported values are:
STOP|CONTINUE|RERUN
Example:
jobDefinition.recoveryOption = 'CONTINUE'
jobDefinition.taskType The task type of the job definition.
Example:
jobDefinition.taskType = 'executable'
jobDefinition.userLogin The username of the job definition.
Example:
jobDefinition.userLogin != 'user3'
jobDefinition.workstation The name of the workstation on which the job definition runs.
Example:
jobDefinition.workstation NOT LIKE '/wks@'
jobDefinition.workstationKey The name of the workstation on which the job definition runs.
Example:
jobDefinition.workstationKey LIKE 'rome1@'
jobDefinitionFlags.monitored The job must be monitored. Supported values are true or false.
jobOptions.critical The critical option is set for the job. Supported values are true or false.
Example:
jobOptions.critical = true
jobOptions.every The every option is set for the job. Supported values are true or false.
Example:
jobOptions.every = false
jobOptions.noOperation The No operation option is set for the job. Supported values are true or false.
Example:
jobOptions.noOperation = true
jobOptions.requiresConfirmation The Requires confirmation option is set for the job. Supported values are true or false.
Example:
jobOptions.requiresConfirmation = false
jobruns.actualWorkstation The name of the workstation where the job actually runs.
Example:
jobruns.actualWorkstation NOT LIKE '@wks@'
jobruns.commonStatus The external status of the job runs. Supported values are:
WAITING|READY|RUNNING|SUCCESSFUL|ERROR|CANCELED|HELD|UNDECIDED|BLOCKED|SUPPRESS
WAITING|READY|RUNNING|SUCCESSFUL|ERROR|CANCELED|HELD|UNDECIDED|INTERRUPTED|COMPLETED|SUPPRESS_BY_COND
Example:
jobruns.commonStatus IN ['WAITING', 'BLOCKED']
jobruns.compositeStatus.status The internal status of the job runs. Supported values are:
HOLD|READY|FENCE|INTRO|FAIL|EXEC|WAIT|SUPPR|END|SUCC|SUCCP|ABEND|CANCL|CANCLP|ABENP|PEND|SUSP|STUCK|EXTRN
WAIT|ARRVING|READY|NONREPPRED|STARTED|INTRPT|CANCL|UNDCDED|COMPLT|ERROR|SUCCP|SUPPR
Example:
jobruns.compositeStatus.status NOT IN ['SUPPR']
jobruns.elapsedTime The elapsed time of the job run instance, that is the real duration.
Example:
jobruns.elapsedTime = 'PT5H9M'
jobruns.estimatedDuration The estimated duration of the job run instance.
Example:
jobruns.estimatedDuration = 'PT9H21M'
jobruns.jobNumber The total number of jobs runs. Supported operators are = and !=.
Example:
jobruns.jobNumber = '3'
jobruns.maxDurationGone The duration of the run is higher than the maximum duration value. Supported values are true or false.
Example:
jobruns.maxDurationGone = true
jobruns.minDurationNotReached The duration of the run is lower than the minim duration value. Supported values are true or false.
Example:
jobruns.minDurationNotReached = false
jobruns.reruntype The type of rerun. Supported values are:
RERUN|RECOVERY_RERUN|RERUN_EVERY|RERUN_FROM|RECOVERY|REGULAR|RERUN_STEP
Example:
jobruns.reruntype IN ['RERUN', 'RECOVERY']
jobruns.returnCode The return code of the job run instance.
Example:
jobruns.returnCode = '1'
jobruns.step The alias name of the job run instance.
Example:
jobruns.step = 'JOBNAME'
jobruns.timeInfo.actualEndTime The time at which the job run instance ended.
Example:
jobruns.timeInfo.actualEndTime = '2025-12-01T23:00:00.000Z'
jobruns.timeInfo.actualStartTime The time at which the job run instance started.
Example:
jobruns.timeInfo.actualStartTime != '2025-12-01T23:00:00.000Z'
jobruns.errorCode The error code of the first operation in error status within the job run.
Example:
jobruns.errorCode LIKE 'OS@'
jobs.jobDefinition.workstationName The name of the workstation where the job definition referenced by the job instance is saved.
Example:
jobs.jobDefinition.workstationName NOT LIKE '@A'
jobStreamId The identifier of the job stream within which the job is saved.
Example:
jobStreamId = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
jobStreamName The name of the job stream within which the job is saved.
Example:
jobStreamName NOT LIKE 'A?@'
jobStreamWorkstation The name of the workstation on which runs the job stream within which the job is saved.
Example:
jobStreamWorkstation != 'WKS_1'
name The name of the job.
Example:
name LIKE '@A?@'
priority The priority value set for the job.
Example:
priority > '9' AND priority <= '100'
jobruns.timeDependent The evaluation of the AT time value of the dependency is active. Supported values are true or false.
Example:
jobruns.timeDependent IN ['false']
timeRestrictions.untilAction The action set for a job when the until time has expired but the job has not yet started. Supported values are:
SUPPRESS|CONTINUE|CANCEL
Example:
timeRestrictions.untilAction = 'SUPPRESS'
timeRestrictions.untilTime The latest time a job can be launched.
Example:
timeRestrictions.untilTime = '2025-03-02T10:35:22.000Z'
workstation The workstation where the job runs.
Example:
workstation LIKE '@wks_rome1@'

OQL syntax fields for resources

The table below provides a comprehensive list and description of OQL fields that apply to resources.
Note: OQL fields are case-sensitive; therefore, adherence to the exact capitalization and spelling is mandatory.

The filtering of resources is only available in distributed enviroments.

Table 5. OQL syntax fields for resources
Field name Description
id The id of the resource.
Example:
id = 'ca15f24a-0e6b-3f1b-9251-854d8d0d3639'
name

The name of the resource.

Example:
name LIKE 'res@'
folder The folder of the resource.
Example:
folder NOT LIKE '@A'
workstation The workstation of the resource.
Example:
workstation LIKE '@_1'
workstationFolder The folder where the workstation of the resource is saved.
Example:
workstationFolder LIKE '/ws_rome@'
quantity The entire quantity of the resource.
Example:
quantity = '5'
quantityInUse The quantity of the resource that is currently in use.
Example:
quantityInUse != '2'
quantityAvailable The quantity of the resource that is available.
Example:
quantityAvailable = '4'
status The status of the resource. Supported values are:
AVAILABLE|NOT_AVAILABLE|UNDECIDED
Example:
status IN ['AVAILABLE']

Examples

This section shows various examples of OQL queries that can be done on jobs, job streams or workstations.
Workstation
  1. The following example shows a query that retrieves all the workstations in plan that are either linked and running, or they are a fault-tolerant agent on a domain that is different from MASTERDM:
    (activeStates IN  ['LINKED'] AND jobmanUp = true) OR (type IN ['FTA']  AND  domainName != 'MASTERDM')
  2. The example below shows a query that retrieves all the workstations that have all the following characteristics:
    • They have a name that contains the sequence of letters NEW
    • They are either agent, fault-tolerant agent, or domain manager type workstations
    • They are in a domain whose name starts with letter M
    • They are in UNLINKED state
    • They are not currently running
    • They are contained in a folder whose name ends with letter A
    name LIKE '@NEW@' AND type IN ['AGENT','FTA','DOMAIN_MANAGER'] AND domainName LIKE 'M@' AND activeStates IN  ['UNLINKED'] AND jobmanUp = false  AND folder LIKE '/@A/'
    
Job stream
  1. The example below shows a query that retrieves either:
    • Job streams whose name does not contain the word JS within and whose limit is greater than 1 and less or equal to 3

      Or

    • Job streams whose name contains the letter A and that has a priority greater than 9 and less or equal to 100
    (name NOT LIKE '@JS@' AND (limit > 1 AND limit <= 3)) OR (name LIKE '@A@' AND (priority > 9 AND priority <= 100))
  2. The following example shows a query that retrieves either:
    • Job streams that are in WAITING and READY status and that have a schedule time between March, 1st 2025 at 12 AM and March, 10th 2025 at 11:59 PM

      Or

    • Job streams that are in ERROR and BLOCKED status and that have a schedule time between January, 1st 2025 at 12 AM and February, 25th 2025 at 11:59 PM
    (commonStatus IN ['WAITING','READY'] AND (schedTime >= '2025-03-01T00:00:00.000Z' AND schedTime <= '2025-03-10T23:59:59.000Z')) OR (commonStatus IN ['ERROR','BLOCKED'] AND (schedTime >= '2025-01-01T00:00:00.000Z' AND schedTime <= '2025-02-25T23:59:59.000Z'))
    
  3. The following example shows a query that performs a basic search. Using regular plan filters, the query would correspond to /WSFOLDER/WS#/JSFOLDER/JSNAME:
    name = 'JSNAME' AND workstation = '/WSFOLDER/WS' AND folder ='/JSFOLDER'
  4. The below query retrieves all job streams whose status is either SUCC, ABEND, or FAIL, and whose start time is prior to 2025/02/27 11:15:00:000 UTC:
    compositeStatus.status IN ['SUCC','ABEND','FAIL'] AND timeInfo.actualStartTime < '2025-02-27T11:15:00.000Z'
    
  5. The following example shows a query that retrieves all the job streams that contain 3 jobs within, and that either:
    • Have priority value set to 101 and are in RUNNING status

      Or

    • Are on folder and on a workstation whose name starts with /WS
    ((priority = 101 AND commonStatus = 'RUNNING') OR (workstation = '/WS@' AND folder = '/')) AND jobStreamStats.numberOfJob = 3
    
Job
  1. The following example shows a query that retrieves all jobs that:
    • Have a name that starts with the letter A
    • Are part of the job stream named JOBS
    Moreover, the query retrieves jobs that either run on the workstation named /WORKSTATION, or that belong to job streams scheduled on /WORKSTATION. Results are sorted by name in descending order:
    name LIKE 'A@'  AND (workstation = '/WORKSTATION' OR jobStreamWorkstation = '/WORKSTATION')  AND jobStreamName = 'JOBS' ORDER BY name DESC
  2. The following query retrieves all jobs that are critical and that either are not in FAIL, ABEND, and HOLD, or have been cancelled:
    (jobruns.compositeStatus.status NOT IN ['FAIL','ABEND','HOLD'] OR jobruns.compositeStatus.canceled = true ) AND jobOptions.critical = true
  3. The below query retrieves all jobs that have a single dependency, excluding those that have completed with either SUCCESSFUL or ERROR status:
    dependenciesStats.numberOfJobDependencies = 1 AND jobruns.commonStatus NOT IN ['SUCCESSFUL','ERROR']
    
Resource
  1. The following example shows a query that retrieves all resources that:
    • Have a name that contains the word RES
    • Have the quantity in use value equal to 3
    • Are in AVAILABLE status
    name LIKE '@RES@' AND quantityInUse = '3' AND status in ['AVAILABLE']
    
  2. The following query retrieves all resources that have a quantity available value that is either 5 or 9, and that are saved in a folder named ROME:
    (quantityAvailable = '5' OR quantityAvailable = '9' ) AND folder = 'ROME'