Page 1 of 1

Pt of the file containing log of a job

Posted: Wed Feb 25, 2009 5:11 am
by bgs_vb
Hi All,

I want to know if the log we are getting in the DataStage Director for a job can be stored in a file or not.If Yes, where from we can get the file.

Thanks in advance

Posted: Wed Feb 25, 2009 5:16 am
by Sainath.Srinivasan
Select
File -> Print

Posted: Wed Feb 25, 2009 5:17 am
by bkumar103
Hi,
The log generated in dsjob is stored in the hash file RT_LOGnn.
You can get the details using dsjob -logdetail command. You can write either custom routine for this or directly from the command prompt.

Thanks,

Re: Pt of the file containing log of a job

Posted: Fri Feb 27, 2009 4:19 am
by bgs_vb
bgs_vb wrote:Hi All,

I want to know if the log we are getting in the DataStage Director for a job can be stored in a file or not.If Yes, where from we can get the file.

Thanks in advance


I want some more information if there is a logpath for each and every project where the log file gets stored for each run of a job present in that project

Posted: Fri Feb 27, 2009 4:29 am
by Sainath.Srinivasan
Did you search?

Posted: Fri Feb 27, 2009 5:47 am
by bkumar103
it is stored in the project directory(where data stage project is created).

Posted: Fri Feb 27, 2009 6:27 am
by bart12872
Well, even if you copy the file containing the log, you won't be able to exploit it or read it. It is write in Basic Universe format.

What do you want to do more precisely.

Martin.

Posted: Fri Feb 27, 2009 8:25 am
by chulett
Logs are stored in tables in each Project repository named after the internal number associated with their parent job. There's no reason to go directly after those tables, however, as there is a perfectly good API for accessing that data.

From the DataStage side, open up the online help Index tab and go to the 'DSGet' section. There you'll find, amongst other things, the following functions used to get log information:

DSGetLogEntry
DSGetLogSummary
DSGetNewestLogId


If you prefer a scripted approach, there are dsjob equivalents to all of them and the same can be done from your favorite shell. Check the Command Line Interface section of either Designer Guide pdf for all the gory details on dsjob.

Posted: Fri Feb 27, 2009 1:26 pm
by ray.wurlod
In particular note that there is no such thing as a log file

Posted: Thu Mar 19, 2009 7:48 am
by bgs_vb
bart12872 wrote:Well, even if you copy the file containing the log, you won't be able to exploit it or read it. It is write in Basic Universe format.

What do you want to do more precisely.

Martin.
I got the log of the job from the unix environment using dsjob -logsum command but it gives the entire log which we can see from the director.But I want the log of last run only.

Posted: Thu Mar 19, 2009 8:26 am
by chulett
Use a combination of the other two options, not the 'summary' one.

Posted: Thu Mar 19, 2009 8:55 am
by sjfearnside
Not sure if this will help =>

I have used an after job subroutine called DSJobReport found in job propertied that report start time, stop time, rows, etc.., There are 3 levels of reports that can be generated from this subroutine. In the input parms you specify the type of report - 1,2,3 and the output directory where the report file is written. Look in the Designer Client Guide PDF, chapter 4 under Before- and After-Job routines for how to use this feature. I do not know if this is available in V7.