Audit File Log -

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
metadata1
Participant
Posts: 10
Joined: Thu Dec 04, 2008 5:50 pm

Audit File Log -

Post by metadata1 »

I am just starting out in DS so need some help -
I am trying to figure out how the manage a basic Job Audit file. It seems that DSgetjobinfo (arg...) and DSgetLinkInfo (arg....) will get it done. I have looked up the forum however most of the searches resulted with some specific issues that members were hashing -

I was wondering if you could guide me in how to use this function in general. My goal is to capture some basic info (like start/end time, row counts etc)

Where and How do you actually call/run this function/routine in DS -
How do you generally channel this info in a txt file or a an audit DB -

Thanks a lot !
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

For things like Project Name, Job name, start/end time, we can use DSMacros(availaible in transformer). For getting more detailed job information, we can write job control routines(in job properties).
1.)Design your actual job. Whatever additional information you require, pass that as parameters.
2.) Write a job control routine in a separate job. For this, you use desired DS functions(available in BASIC pdf), store them in variables. Then from "ADD JOB" in job control, call the actual job. You will see whatever parameters you passed for the actual job. Change the default values of them(including quotes) with the variables created above.

Just see if this helps you !
Rgds,
MB
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Rather than re-invent the wheel, search the forums here for 'ETLStats'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

Hi Craig,
i think the moderator has a bit idea of what he's to use but the heck was , where !
& metadata1, after you know what to specify where, search'll surely assist you for the rest !
Rgds,
MB
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Umm... what? That sentence doesn't make much sense. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

I meant..metadata1 has some idea which DS functions he/she would require to obtain his/her results, as wriiten :
It seems that DSgetjobinfo (arg...) and DSgetLinkInfo (arg....) will get it done.
The problem aired was where these things need to be specified.
Where and How do you actually call/run this function/routine in DS -
Rgds,
MB
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

& metadata1... please confirm if that's not what you asked for !
Rgds,
MB
metadata1
Participant
Posts: 10
Joined: Thu Dec 04, 2008 5:50 pm

Post by metadata1 »

Hey mdbatra -

I have recently started working on DS - I am aware of some existing functions/routines that we could use like DSgetjobinfo - however, I was not sure where to place them in a job design and capture their return values as needed - Should this be done on a Command prompt (unix/windows) after the job has finished (how to trigger it) or place the function somewhere in the Transformer and then the value is caputured and passed down to a file.

I looked up ERTstats as directed by Craig and got to the link for Duke Consulting where they have some prestored zip files to add to the job - I guess it has a lot more details to it - I was just looking for some basics like Time Start/End, No of records loaded in a stage (Target) -

If you could shed some light on this procuedure, I could continue my research in the right direction-

Thanks -
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

To work from the command prompt you would build scripted calls to 'dsjob' and the various options it has. Check the Command Line Interface section in either Designer's Guide pdf for the options and their syntax. For all of the DSGet* functions that you would use in a derivation or more likely a custom routine there are equivalents with dsjob.

And if you are new to DataStage but have written scripts / batch files in the past you may find that approach easier.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply