How To
Summary
There's an event (job, message, process, or task) that runs every day, and you want to detect when this event runs earlier than a specified time. How to detect this?
Objective
Environment
Steps
The 'R/3 Batch Jobs' has a 'Start Time' attribute, which you want to use for the monitoring of the start time of a specific job. Using the 'Compare Date and Time' function would look straightforward, but as 'Start Time' is a TIMESTAMP attribute, and it expects a date+time, it cannot have time only and needs a date as well.
Therefore, we would need another approach.
In fact, as it is a TIMESTAMP attribute, it has this format under the covers:
Standard 16-character date/time format (CYYMMDDHHMMSSmmm), where:
C Century (0 for 20th, 1 for 21st)
YY Year
MM Month
DD Day
HH Hour
MM Minute
SS Second
mmm Millisecond
Knowing this, you could adapt your situation to use the 'Return a subset of the string' function, with the '<' (less than) operator.
20:10:00 corresponds to HHMMSS, and HHMMSS starts at the 8th position in the CYYMMDDHHMMSSmmm string.
So, in the situation you could specify to start at the 8th position, and define your condition 'less than 201000000', which would match any timestamp that is earlier than 20:10:00.
Your situation should look like this:
*IF *SCAN R/3_Batch_Jobs.Job_Name *EQ ZAUP *AND *STR R/3_Batch_Jobs.Start_Time *LT 8,201000000
Document Location
Worldwide
Product Synonym
itmv6;itcam
Was this topic helpful?
Document Information
Modified date:
28 September 2020
UID
ibm11274434