Read Log of another jog

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
RAI ROUSES
Participant
Posts: 176
Joined: Wed Nov 15, 2006 5:48 am

Read Log of another jog

Post by RAI ROUSES »

Hi,
With one job I want to access to the logs of others jobs, that i had already run, and know how many records had been read/ written, in one specific link.
How can I do that?

regards
Rai
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You have a few different ways. You can use DSGetJobInfo() function. You can use DSGetLinkInfo(). You can use DSGetLogSummary.
Log files are stored in hashed files with the naming convention RT_LOGnnn where nnn is the internal id for a specific job. You can get that from DS_JOBS.
Yet another way is to do it at the unix level by writing a script and parsing through the log file to get what you want.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In other words, you don't need to read the other job's log to get that information. There are functions to allow you to check the job directly if all you want is the information from its most recent run.

There are also functions to pull information from logs, DSGuru noted one such. There are also all the same equivalents using the 'dsjob' command at the command line in a script.

I would counsel against querying the repository directly as it is the least 'future proof' methodology you could choose. Best to stick with the published APIs. IMHO.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a job in EtlStats which extract the row counts from old runs not just the current run which is waht the API will do. It will post these to a hashed file so you can post these to the regular tables like ETL_ROW_HIST. The job name is EtlGetRowCountsFromLog.
Mamu Kim
Post Reply