Page 1 of 1

How to get latest log info of a job

Posted: Fri Aug 20, 2004 7:19 am
by Jayesh_09
Guys
Can any one help me.
I want to get latest logs for a job.Any routine.
Please help

Regards
Jay

Posted: Fri Aug 20, 2004 7:47 am
by roy
Hi,
You can see if the dsjob command line is enough for you.
If not look in the basic.pdf in your client installation directory under docs for the basic routines for working thru the logs.

IHTH,

Posted: Fri Aug 20, 2004 7:56 am
by richdhan
Hi Jayesh,

Before you post a topic do a search with topic keywords. If you dont get results then post the topic.

Check if this link helps
viewtopic.php?t=88792

These are the functions that Roy is talking about

DSFindFirstLogEntry
DSFindNext LogEntry
DSGetLogEntry
DSGetNewestLogId

These function can be used in a routine to get the log information.

HTH
--Rich

Pride comes before a fall

Posted: Fri Aug 20, 2004 5:52 pm
by ray.wurlod
Welcome aboard! :D

In the Director client, log view (the "open book" tool), log entries are - by default - sorted in date/time order, so that the most recent are at the end. You can change the sorting order by double-clicking the the grid header.

At the right hand side is a hidden column (that you can expand) called Date Sorter. This is the numeric event number by which the log table is keyed. It's this, rather than timestamp, that is used to sort log entries for display (because sorting integers is quicker than sorting timestamps).

If you definitely want to use a routine, then the functions posted earlier are the ones to use. You did not, however, specify whether this was to be a DataStage routine or an external routine, nor what the expected result is. The term "latest logs" is meaningless; each job has exactly one log, which is a database table in the DataStage repository. It's not a case of multiple O/S files, which is what you may have been thinking.