Reading the DSJobReport file

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
Sakthi_Sst
Participant
Posts: 36
Joined: Wed Aug 09, 2006 12:18 am
Location: Chennai

Reading the DSJobReport file

Post by Sakthi_Sst »

Hi All,

I have used an after Job routine "DSJobReport" to generate the reports.
I have also got a text file with all the information on the file.
But there is some junk characters in between each filed.

So how do i get rid of these junk characters or how do i read this text file in an Sequential stage?

I have attached the report i.e. the contents of the text file along with this post.


**************************************************
STATUS REPORT FOR JOB: Job1
Generated: 2008-03-27 19:36:08
Job start time=2008-03-27 19:35:31
Job end time=2008-03-27 19:36:08
Job elapsed time=00:00:37
Job status=2 (Finished with warnings)
Stage: Sequential_File_0, 4 rows input
Stage start time=2008-03-27 19:35:49, end time=2008-03-27 19:36:04, elapsed=00:00:15
Link: TO_Sort, 4 rows
Stage: Sort_3, 4 rows input
Stage start time=2008-03-27 19:35:49, end time=2008-03-27 19:36:07, elapsed=00:00:18
Link: TO_Sort, 4 rows
Link: TO_Trnsfrmr, 4 rows
Stage: Transformer_6, 4 rows input
Stage start time=2008-03-27 19:35:52, end time=2008-03-27 19:36:07, elapsed=00:00:15
Link: TO_Trnsfrmr, 4 rows
Link: TO_Reject, 2 rows
Link: TO_Target1, 2 rows
Stage: Reject, 2 rows input
Stage start time=2008-03-27 19:35:52, end time=2008-03-27 19:36:07, elapsed=00:00:15
Link: TO_Reject, 2 rows
Stage: Target, 2 rows input
Stage start time=2008-03-27 19:35:52, end time=2008-03-27 19:36:07, elapsed=00:00:15
Link: TO_Target1, 2 rows
Sakthi
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What do you think is Junk in about report??
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't see any junk.

Do you mean line terminators?
These are converted to field marks (@FM) when the file is loaded into a string, so that there's a consistent interface whether the operating system is UNIX (single-character line terminators) or Windows (dual-character line terminators).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why not use

dsjob -report XML Project Job
Mamu Kim
Sakthi_Sst
Participant
Posts: 36
Joined: Wed Aug 09, 2006 12:18 am
Location: Chennai

Post by Sakthi_Sst »

Hi All,

1.When I copy it and paste it over here it doesn't show up that character.
But in the text file file which is created there is a character which is at the beginning and at the end of every field.

2.I n't sure whether it is a Line teriminator.

3. When I change the delimiters to none in the Sequential stage,I can read the file, but as a single field.

How do I read the single field as different fileds of the text file and load it in to a table?

Requirement :
Read the report file and load it into a table, fields such as Job start time.Job end time,Job name,Job status.......
Sakthi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use @FM system variable as the delimiter character for the Field() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use @FM system variable as the delimiter character for the Field() function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Why not download EtlStats. It does this for you.
Mamu Kim
Sakthi_Sst
Participant
Posts: 36
Joined: Wed Aug 09, 2006 12:18 am
Location: Chennai

Post by Sakthi_Sst »

Ray,


Where exactly do I use this @FM variable.

Is it at the field propeties do I type " @FM " ?

or in Format -> field delimiter ?

Kindly let me know about this.
Sakthi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Field(Name.$CommandOutput, @FM, 2, 1) returns the second line of the command output from the Execute Command activity called Name.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sakthi_Sst
Participant
Posts: 36
Joined: Wed Aug 09, 2006 12:18 am
Location: Chennai

Post by Sakthi_Sst »

Ray,

I really do not get this workaround.
Can you kindly explain me in detail.
Should I use an Exec activity to read this file?
Sakthi
Post Reply