Page 1 of 1

LoadRunStats.AutoMeter has never been run

Posted: Thu Aug 13, 2009 1:40 pm
by olgc
Hi There,

LoadRunStats is an "Allow Multiple Instance" job.

When the following statement is executed in Job Control tab of a job properties

LdJobHandle=DSAttachJob("LoadRunStats.AutoMeter", DSJ.ERRWARN)

The error below is showed. How to fix the problem?

Thanks in advance,

EEROR Message:

Project:***
Job name:AuditInfo
Event #:1446
Timestamp:13-Aug-2009 2:12:47 PM
Event type:Warning
User:****
Message:
AuditInfo..CollectAuditInfo_Trns (DSRunJob): Job control error (-2)
(DSRunJob) LoadRunStats.AutoMeter has never been run.

Posted: Thu Aug 13, 2009 2:16 pm
by ArndW
Are you certain that the message is at the DSAttachJob()? Try a DSLogWarn() before and after to make certain - I've never seen that message triggered from that call.

Posted: Thu Aug 13, 2009 2:18 pm
by chulett
Neither have I. :?

Posted: Thu Aug 13, 2009 5:03 pm
by ray.wurlod
It appears that AutoMeter is an invocation ID, and I am guessing that the message derives from DSPrepareJob() - you can't reset a job that has never been run. It may be innocuous.

Posted: Thu Aug 13, 2009 5:49 pm
by chulett
Looks like it came from DSRunJob() so perhaps with a DSJ.RUNRESET RunMode? Does your code always attempt a reset or only if the job 'needs' it? I would think this would actually be avoided by use of the DSPrepareJob() function. :?

Posted: Fri Aug 14, 2009 9:24 am
by olgc
Thanks for all your responses.

Now I know what's the problem. The key word here is "Allow multiple Instance" Job. It is the attach command. Only when this command succeeds, other operations can be followed.

If it's executed once from a regular sequence job with a job activity, it can be attached by a call to DSAttachJob() (After the call, a new instance will be showed up in Datastage Director). That's why it "has never been run".

Thanks,