Page 1 of 1

How to log a message in the log?

Posted: Tue Mar 02, 2004 9:17 am
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.

Posted: Tue Mar 02, 2004 1:07 pm
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

Posted: Tue Mar 02, 2004 3:24 pm
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.

Posted: Fri Mar 05, 2004 9:29 am
by nsm
Thanks ray.