Linebreaks in the 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
phanee_k
Charter Member
Charter Member
Posts: 68
Joined: Thu Nov 20, 2003 11:02 pm

Linebreaks in the log

Post by phanee_k »

Hi,
I am able to get the log with DSGetLogSummary.
I find that there are some line breaks for a log event which I am not able to read.
Is there any way to eliminate the explicit line breaks and read the log in detail.

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

Post by ray.wurlod »

You need to find out what character is being used as a line terminator - it's probably one of Char(10), @FM, @VM or @TM. Simply convert these to space.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
phanee_k
Charter Member
Charter Member
Posts: 68
Joined: Thu Nov 20, 2003 11:02 pm

Post by phanee_k »

Hi Ray,
When we use DSGetLogSummary , I understand that it will only read the log that got generated. So in that case , how can we read the log which is having linebreaks in it.

Is there any way to capture the Message ID through which we can capture the message and then do convert on char(10), @VM etc.,

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

Post by ray.wurlod »

Do you want the summary without line breaks, or do you want the detail?

To get the detail of any particular event, you need DSGetLogEvent(). To use this you will need the event number. The usual way to get the event number is to use DSGetNewestLogId(). Probably easiest is to get the absolutely last event in the log, then decrement EventID until you encounter either a "job started" event or the smallest EventID in the log.

Research these function in on-line help.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply