How to log a message in the log?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

How to log a message in the log?

Post by nsm »

Hi,
I wanted to log the number of records read from the input link and written to each output link( why i wanted to do this is to made my job easy when i am looking at the log in unix, instead of doing logdetail on every eventid)

I know i have to use Call DSLogInfo, but my question is do i have to definitely call it in the routine?

suggest me how can i use that.

Thanks
nsm.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

You really have several options. You can:
1. create a routine, use it in a transformer and report on transformers that have completed earlier in the job
2. create a routine and use it as an after stage, or after job subroutine
3. create a control job (or batch) that runs multiple jobs and call your routine from there.

John
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That information is already logged for you, in an "active stage finishing" message. Why do you want to do it separately?

The answer to your question is that you do need to do it in a routine. If you try to do it, say, in a column derivation, then it occurs every row, which will slow your job down hugely and take up vast amounts of log space.

Incidentally, you can alternatively discover the required information using DSGetLinkInfo(jobhandle, stagename, linkname, DSJ.LINKROWCOUNT) either in an after-stage or after-job routine or from the controlling job. If from a controlling job you can still log an event in the child job's log file using DSLogEvent.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

Thanks ray.
Post Reply