Page 1 of 1

Audit File Log -

Posted: Thu Dec 25, 2008 9:45 pm
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 !

Posted: Fri Dec 26, 2008 12:23 am
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 !

Posted: Fri Dec 26, 2008 1:39 am
by chulett
Rather than re-invent the wheel, search the forums here for 'ETLStats'.

Posted: Fri Dec 26, 2008 4:54 am
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 !

Posted: Fri Dec 26, 2008 9:38 am
by chulett
Umm... what? That sentence doesn't make much sense. :?

Posted: Sat Dec 27, 2008 10:16 am
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 -

Posted: Sat Dec 27, 2008 10:19 am
by mdbatra
& metadata1... please confirm if that's not what you asked for !

Posted: Sat Dec 27, 2008 3:17 pm
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 -

Posted: Sat Dec 27, 2008 3:23 pm
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.