Page 1 of 1

Find what jobs are called from what sequencers

Posted: Sat Dec 27, 2008 5:19 am
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.

Posted: Sat Dec 27, 2008 3:34 pm
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.

Posted: Sat Dec 27, 2008 5:42 pm
by tbtcust
Thanks ray. I mean run from the job sequence.

Posted: Sun Dec 28, 2008 12:17 am
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.

Posted: Sun Dec 28, 2008 9:17 pm
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.

vg

Posted: Sun Dec 28, 2008 11:48 pm
by dr.murthy
hi ,,
i didn't get the solution clearly,can u please clear me.

Posted: Mon Dec 29, 2008 12:18 am
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".

Posted: Mon Dec 29, 2008 12:53 am
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.

Posted: Mon Dec 29, 2008 7:26 am
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.