[SOLVED] Repository Tables ('bot') about Scheduler
Does someone know where to find the 'recurrences' information in the repository tables sothat I can make an SQL Report about the Report Caster schedules?
I coundn't find recurrences Information in the BOTTASK, BOTSCHED, etc. tables.This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8.1.05 Windows, All Outputs
February 12, 2018, 03:54 AM
Wep5622
Based on below code, I think that information is in BOTSIT:
-*
-* Get RCaster schedule info for load-fex
-*
JOIN
SCHEDULEID IN BOTSCHED TO
SCHEDULEID IN BOTSIT AS J0
END
JOIN
PACKETID IN BOTSCHED TO
PACKETID IN BOTTASK AS J1
END
JOIN LEFT_OUTER
SCHEDULEID IN BOTSCHED TO MULTIPLE
SCHED_ID IN BOTLOG AS J2
END
DEFINE FILE BOTSCHED
DUMMY/A1V WITH NEXTRUNTIME = ' ';
FEXPATH/A1200V = UPPER(TASKOBJ);
END
TABLE FILE BOTSCHED
PRINT
FST.SCHEDULEID/A12
NEXTRUNTIME
RC_ERROR
LASTEXSTATUS
ACTIVE
BY DUMMY
BY SCHEDULEID NOPRINT
BY JOBDESC
BY TASKID
BY TASKNAME
BY TASKOBJ
-* Latest and previous end times
BY HIGHEST 2 END_STAMP
WHERE FEXPATH LIKE '&FEXEXPR' OR FEXPATH LIKE '%&LOADFEX';
WHERE RUNEVERY NE '0';
ON TABLE HOLD AS GEN_SCHEDULE FORMAT FOCUS INDEX SCHEDULEID
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
END
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
February 12, 2018, 04:37 AM
Tony A
WEP is correct, the table you need is BOTSIT.
Columns to look for are INTERVALTYPE and RUNEVERY. A combination of these should enable you to infer the detail that you need.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
February 12, 2018, 07:34 AM
jenni
Great! Do xou also know how to convert nextruntime an repeatnextruntime? with define file
BASE_DATE/YYMD=19700101; HBASE_DATE/HYYMDS=HDTTM(BASE_DATE,8,'HYYMDS'); nextruntime/HYYMDS= HADD(HBASE_DATE,'MILLISECONDS',BOT_END,8,'HYYMDS'); I get the same values for both fields, but that can't be correct. Thanks for your help.
If possible, do you know where to find like a documentation for each field?
WebFOCUS 8.1.05 Windows, All Outputs
February 12, 2018, 11:50 AM
Wep5622
Based on my previous example, mixing the raw MS SQL database (where our RCaster repo lives) in between, we do it like this:
SQL SQLMSS PREPARE SQLOUT FOR
SELECT
GETDATE() - GETUTCDATE() AS DIFF_UTC,
' ' AS DUMMY
;
END
JOIN DUMMY IN GEN_SCHEDULE TO UNIQUE DUMMY IN GEN_TZINFO AS J0
DEFINE FILE GEN_SCHEDULE
LASTRUNTS/HYYMDs MISSING ON SOME = HADD(EPOCH_AT_TZ, 'ms', END_STAMP, 8, LASTRUNTS);
NEXTRUNTS/HYYMDs MISSING ON SOME = HADD(EPOCH_AT_TZ, 'ms', NEXTRUNTIME, 8, NEXTRUNTS);
END
TABLE FILE GEN_SCHEDULE
SUM
FST.LASTRUNTS
FST.RC_ERROR
FST.LASTEXSTATUS
FST.ACTIVE
FST.NEXTRUNTS
FST.SCHEDULEID
COMPUTE DUMMY/A1 = ' ';
COMPUTE RUN/I1 = LAST RUN +1;
-* Order them such that DUMMY = 1 gives earliest and DUMMY = 2 gives latest date
BY END_STAMP NOPRINT
ON TABLE HOLD AS GEN_LASTRUN FORMAT FOCUS
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
END
We use this code with reports that are based on HOLD files that are loaded from RCaster, to dsplay the last date that the RCaster job succeeded - giving the user an indication of whether they're looking at accurate data. In some cases we add a drilldown on that date to the procedure that RCaster runs for key-users, so that they can update the data right away.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :