Find what jobs are called from what sequencers

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
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Find what jobs are called from what sequencers

Post by tbtcust »

Hi all.

I have 2000+ jobs and 400+ sequencers in a project. I need to be sure that no job is called from multiple sequencers.

How can I generate a report that shows what jobs are called by what sequencer?

The goal is to have the report in the following format
Job_01 Seq_01
Job_02 Seq_01
Job_02 Seq_02
Job_03 Seq_10
.
.
.

Thanks in advance for any help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When you specify "called by", do you mean "actually run from" the job sequence (note: it's not "sequencer") or do you mean "appearing in the design of the job sequence but may or may not be invoked depending upon the logic in the job sequence"?

For a single job you can perform a Lineage Analysis to answer the second question. To answer the first form you need to interrogate the log of the job sequence. To answer for multiple jobs a more complex query will be needed against the Repository.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Thanks ray. I mean run from the job sequence.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In each job sequence's log there is a "summary of sequence run" event logged near the end. Everything you need is in that entry. Otherwise you can search within the log for "job run requested" events.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Thanks ray. A print to file (dsjob -logdetail...) of the job sequence logs and a quick datastage job to pull and organize the information from the log file did the trick. Thanks again.
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

vg

Post by dr.murthy »

hi ,,
i didn't get the solution clearly,can u please clear me.
D.N .MURTHY
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Probably not, because U is currently working at a server-only site.

The second person personal pronoun in English is spelled "you", not "u".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

ray.wurlod wrote:Probably not, because U is currently working at a server-only site.

The second person personal pronoun in English is spelled "you", not "u".
Thanks ray.wurlod,
thanks for your valuable suggestion.
D.N .MURTHY
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Post by tbtcust »

Apologies to the forum. I should have included some detail.

In a batch job (PrintSequence.bat) I have the following
dsjob -logdetail ProjectName SequenceName_1
dsjob -logdetail ProjectName SequenceName_2
dsjob -logdetail ProjectName SequenceName_3
.
.

In a Execute Command stage printed the sequence logs to a text file via the following command
PrintSequence.bat > PrintSequenceDetail.log


In a DataStage job I read the PrintSequenceDetail.log like a text file and:
1) Scan for "Summary of sequence run" and "Sequence finished". This is the beginning and end of the information I'm interested in, i.e., the Sequence and Job names
2) Now capture the Sequence and Job names striping out time stamp and other info I don't need
3) Sort the Job names setting KeyChange to true
4) Now write the Sequence and Job names to a text file whose KeyChange is greater than > 1

Now I have a list of all the Jobs that are in multiple job sequence

Hope this helps.
Post Reply