Page 2 of 2

Posted: Fri Nov 17, 2006 8:46 am
by ArndW
This documentation error has been known by IBM/Ascential for a while; I know I reported it over a year ago and got some tracking number for it. The BASIC Guide is actually pretty solid and doesn't contain many errors or omissions (unlike the PX ones).

Posted: Fri Nov 17, 2006 1:57 pm
by narasimha
ray.wurlod wrote:Yes. Notify the documentation fault via your support provider. Use the tokens in JOBCONTROL.H.
My JOBCONTROL.H has DSJ.JOBLASTTIMESTAMP

In my DS Constants, going through the drop down list from the Expression Editor menu, I find DSJ.JOBLASTIMESTAMP but no DSJ.JOBLASTTIMESTAMP.

If I use DSJ.JOBLASTTIMESTAMP in the derivation it complains, it does not complain for DSJ.JOBLASTIMESTAMP.(But get the warning in the logs for undefined InfoType.

So what is the correct usage? I am Confused :(

Posted: Fri Nov 17, 2006 2:04 pm
by vsi
me too confused. :(

Thanks
vsi

Posted: Fri Nov 17, 2006 2:10 pm
by narasimha
Can you please go for a new post for this, it is not related to the discussion in this thread.

Posted: Tue Nov 28, 2006 9:41 am
by Nagin
narasimha wrote:Can you please go for a new post for this, it is not related to the discussion in this thread.
Can you please tell me how do I look up the new post, if you've started it. Its an interesting topic, I would like to know more about it.

Posted: Tue Nov 28, 2006 10:12 am
by chulett
One way would be to click on the poster's name and in their profile you can 'find all posts' by them. They are sorted in reverse date order, so hopefully it would be somewhere near the top and easily recognizable. :wink:

Posted: Tue Nov 28, 2006 10:27 am
by narasimha
Nagin wrote:
narasimha wrote:Can you please go for a new post for this, it is not related to the discussion in this thread.
Can you please tell me how do I look up the new post, if you've started it. Its an interesting topic, I would like to know more about it.
I am still waiting on sombody who has encountered similar problems. This is not yet resolved :cry:

Posted: Tue Nov 28, 2006 10:33 am
by chulett
What exactly is the problem you are waiting on a resolution for? With cryptic messages and obviously edited posts from other folks, I can't really tell at this point. :?

Posted: Tue Nov 28, 2006 10:38 am
by rameshrr3
im addressing VSI's original query here

I feel you cannot get the end time of a job within a job itself, because the job run cycle would not have completed . You would need to write a routine that attaches the job , and reads the job info , using DSGetJobInfo, after the job has completed a run. I use a routine activity stage in the sequencer, that runs after every job and gets the job start time, end time , status, warning and fatal error messages etc and write it to a 'LOG FILE'( One of the crazy 'business requirements'). As noted you can also try the ETl Stats package. For the routine's code you can try this piece of junk

Code: Select all


$INCLUDE DSINCLUDE JOBCONTROL.H 

DET = 0 
hJob = Trim(Job) 
DirName = Field(FileVar,';',1,1) 
File = Field(FileVar,';',2,1) 

ReportText = ''
PathName = ''
RetVal = 0
*----------Get Basic Job Info-------------------------------------*

JobHandle = DSAttachJob(hJob,DSJ.ERRFATAL) 
JobName = DSGetJobInfo(JobHandle,DSJ.JOBNAME) 
JobStarted = DSGetJobInfo(JobHandle,DSJ.JOBSTARTTIMESTAMP) 
JobEnded = DSGetJobInfo(JobHandle,DSJ.JOBLASTTIMESTAMP) 
JobElapsed = DSGetJobInfo(JobHandle,DSJ.JOBELAPSED)
JobStatus = DSGetJobInfo(JobHandle,DSJ.JOBSTATUS) 

ReportText = JobName:",":JobStarted:",":JobEnded:",":JobElapsed:",":JobStatus:Char(10)
*---------      Write Info To File in Append Mode------------------*

PathName = DirName:File

OpenSeq PathName To F.Var Then
Loop
ReadSeq Dummy From F.Var Else Exit ;* at end-of-file
Repeat
WriteSeqF ReportText To F.Var Else
Call DSLogFatal("Cannot write to ":PathName, "MyRoutine")
End
End Else
Call DSLogFatal("Cannot open file ":PathName, "MyRoutine")
End


*-------    Release Job   ----------------------------------------*
DET = DSDetachJob(JobHandle) 
Ans = 0
Job and FileVar are the arguments to this routine, FileVar consiste of directory path and filename, seperated by a semi colon. You will need to test this routine or customize it appropriately.

Posted: Tue Nov 28, 2006 10:40 am
by Nagin
chulett wrote:What exactly is the problem you are waiting on a resolution for? With cryptic messages and obviously edited posts from other folks, I can't really tell at this point. :?
Craig,
We are trying to find how to get the job end date time as the following command triggering a warning message "DSGetJobInfo(DSJ.ME,DSJ.JOBLASTIMESTAMP)"

Posted: Tue Nov 28, 2006 10:52 am
by narasimha
vsi wrote:Narsimha,
Thank you very much for your routine.

But i wonder why this is not possible to use

Code: Select all

DSGetJobInfo(DSJ.ME,DSJ.JOBLASTTIMESTAMP)
inside Derivation?

But i can use

Code: Select all

DSGetJobInfo(DSJ.ME,DSJ.JOBSTARTTIMESTAMP)
inside Derivation field,WithOUT any problem.

did someone tried using these in Derivation field?

Thanks
vsi
This was the issue I wanted to resolve, but got into another issue!
ray.wurlod wrote:Yes. Notify the documentation fault via your support provider. Use the tokens in JOBCONTROL.H.

1. My JOBCONTROL.H has DSJ.JOBLASTTIMESTAMP

2. In my DS Constants, going through the drop down list from the Expression Editor menu, I find DSJ.JOBLASTIMESTAMP but no DSJ.JOBLASTTIMESTAMP .

If I use DSJ.JOBLASTTIMESTAMP in the derivation it complains, it does not complain for DSJ.JOBLASTIMESTAMP .(But get the warning in the logs for undefined InfoType.

Craig, I wanted to know the correct usage, is it DSJ.JOBLASTTIMESTAMP or DSJ.JOBLASTIMESTAMP.

Posted: Tue Nov 28, 2006 10:52 am
by rameshrr3
as noted You cannot Use DSJ.LASTIMESTAMP, it is DSJ.LASTTIMESTAMP. And you do not use it from the transformer stage derivation within that job. When job executes the transformer, it hasnt yet completed, so how can you capture its end time within a run? You need to have a routine that attaches the job after the job has completed a run, gets all the info on the job and detaches it.

hth

ramesh

Posted: Tue Nov 28, 2006 11:06 am
by narasimha
Nagin wrote: We are trying to find how to get the job end date time as the following command triggering a warning message "DSGetJobInfo(DSJ.ME,DSJ.JOBLASTIMESTAMP)"
If you need the job end time, use either the routine ramesh has provided or mine on the previous page, as an after job routine, you should be fine!