This code is compiled:
--CalcStats.mac
connect \\...\tqmdat\QILOG\tqm<file://\\...\tqmdat\QILOG\tqm>
edit using QILogStats
disconnect
exit
return
-----------------------
QILogStats on After Start EEP has
property rbase_form_action FormSetup ''
closewindow
return
FormSetup does
property rbase_Form_action VarSetup ''
property rbase_Form_action BGStats ''
property rbase_Form_action GrpStats ''
RETURN
--BGStats
SET VAR fEditTable = 'StatBGEditPrgrphs'
SET VAR fOpenTable = 'StatBGOpenPrgrphs'
SET VAR fCheckTable = 'StatBGChckPrgrphs'
SET VAR fAddlWhere TEXT = NULL
set var fAddlAnd text = null
set var fExtraCol text = null
set var fExtraColComma text = null
PROPERTY RBASE_FORM_ACTION CaculateStats ''
RETURN
--CalculateStats
SET VAR fAddlWhere TEXT
SET VAR fAddlAnd TEXT
SET VAR fExtraCol TEXT
SET VAR fExtraColComma TEXT
--Looks for Paragraph stats for BG.
SELECT COUNT (*) +
INTO vCount +
INDICATOR viCount +
FROM QIParagraphs &fAddlWhere
IF vCount > 0 THEN
INSERT INTO &fCheckTable (TodayDate, &fExtraCol, CheckBox, Qty) +
SELECT .#DATE, &fExtraColComma CheckBox, COUNT(*) +
FROM QIParagraphs +
&fAddlWhere +
GROUP BY CheckBox
INSERT INTO &fCheckTable (TodayDate, &fExtraCol, CheckBox, Qty) +
SELECT .#DATE, &fExtraColComma 'Tot', COUNT(*) +
FROM QIParagraphs &fAddlWhere
ENDIF
--Looks for Open Paragraphs for BG in a date range.
SET VAR fOpenParaDates = ('-14,60,180,365')
SET VAR fSSubCounter = 1
SET VAR fSSub = (SSUB(.fOpenParaDates,.fSSubCounter))
WHILE fSSub IS NOT NULL THEN
SET VAR fSSubInt INTEGER = .fSSub
IF fSSubInt >0 THEN
SET VAR fDateRange = ('between 0 and' & .fSSub)
ELSE
SET VAR fDateRange = ('<=' & .fSSub)
ENDIF
INSERT INTO &fOpenTable (TodayDate, &fExtraCol, DaysInRange, Qty) +
SELECT .#DATE, &fExtraColComma .fSSubInt, COUNT(*) +
FROM QIParagraphs +
WHERE CheckBox IN ('( )', '(.)', '[ ]', '[.]', '{ }', '{.}') +
AND (TargetDate - .#DATE) &fDateRange +
&fAddlAnd
SET VAR fSSubCounter = (.fSSubCounter + 1)
SET VAR fSSub = (SSUB(.fOpenParaDates,.fSSubCounter))
ENDWHILE
--Paragraphs Edited Today
INSERT INTO &fEditTable (TodayDate, &fExtraCol, Qty) +
SELECT .#DATE, &fExtraColComma COUNT(*) +
FROM QIParagraphsAudit t1, QIParagraphs t2 +
WHERE QIPEditDate = .#DATE +
AND t1.Precno = t2.Precno +
&fAddlAnd
RETURN
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Goldberg
Posted At: Friday, January 04, 2008 1:19 PM
Posted To: RB6-L
Conversation: [RBASE-L] - RE: Running Scheduled Task
Subject: [RBASE-L] - RE: Running Scheduled Task
Post a snippet of the command file. Maybe there is something in it
Dan Goldberg
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Parks
Sent: Friday, January 04, 2008 11:17 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Running Scheduled Task
I have a scheduled task that runs once a day that is supposed to load stats
based on another table into it.
If I double click on it from the scheduled task it runs and inserts values into
the table.
If I just let it run from the scheduled task it updates the last ran date but
it doesn't insert values into the table.
What should I be looking for causing the different behaviors?