Newest Log

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
peterh
Participant
Posts: 9
Joined: Thu Feb 13, 2003 2:34 am

Newest Log

Post by peterh »

Hello,

I'm trying to get last log event. The problem is that job is multi instance and all instances are running concurrently and when I used following piece of code:
EventId = DSGetNewestLogId(DSJ.ME,DSJ.LOGANY)
LastLog = DSGetLogEntry(DSJ.ME,EventId)

time to time (accidentally) I have got LastLog from the different instance.
I know that the log is common for all instances. Is there some way how to get this information for the corresponding instance?

Thanks

Peter
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Do you use an routine to run this code or job control ?
It's better if you got in hand the real job handle instead of DSJ.ME.

The other option I see is to get the newest log id and then loop backward until you encounter the job.invocation you are looking for.

You can get the job and invocation name from the DS macros.


HTH,
Amos
peterh
Participant
Posts: 9
Joined: Thu Feb 13, 2003 2:34 am

Post by peterh »

Thanks, Amos.
Code is used in job controler. I'm going to try second option - search the backwards.

Peter
Post Reply