Page 1 of 1

Director view

Posted: Fri Jun 08, 2007 11:06 am
by I_Server_Whale
Hi All,

I think this is not possible directly in Datastage for sure. But I just wanted to confirm.

My client has certain common jobs reside in a folder/category called "Common". So when these jobs are used in various job sequences related different ETL processes. Obviously, the "Common" jobs being used are kicked off and the respective logs are shown in the DS Director under the "Common" folder. But my client wants to know if it is at all possible to view these common jobs under the specific ETL process folder/category. It is really hard for me to believe that this is easily possible. For example:

Folder/Category structure of jobs:

Code: Select all


Jobs
    ------AAAA(sub-category)
           ----job1
           ----job2
           ----job sequence 1
    ------Common(sub-category)
           ----job3
           ----job4
           ----job5
    -------BBBB(sub-category)
           ----job6
           ----job7
           ----job8
           ----job9
           ----job sequence 2

         
So, what they want is:

Say, if job sequence 2 uses job3, job4 in the Common category, and then if job sequence 2 is kicked off, the DS Director would show the jobs (job3 and job4) running under "Common" category. But they want them to be shown under category "BBBB" because job sequence 2 which kicked off these common jobs is under "BBBB".

I know this is really wasting time for nothing. But they seem to be adamant. Can this be done either directly or indirectly?

Your help is greatly appreciated as always,

Thanks again, :)

Whale.

Posted: Fri Jun 08, 2007 11:55 am
by chulett
Short answer: no.

You can look in the log of the job at the first log entry and it will note the Job Controlling job:

Code: Select all

DSJobController = Sequence2
The last message it will post will be one that again notes that the job was run under the control of another job:

Code: Select all

(Sequence2) <- job2: Job under control finished.
Based on that, I suppose you could write your own custom viewer or some such. :P

Posted: Fri Jun 08, 2007 12:18 pm
by uegodawa
I'm pretty sure you cannot find a solution using DataStage Director itself.
But this can be achieved by using following technologies;
* Windows Scripting (Wscript Object)
* Microsoft Active Server Pages (ASP)
* Datastage API - dsjob

You need to develop front-end application using above thoses technologies which calls dsjob, then get job info and refresh the front page. I've done similar kind of application long time ago. But don't have source code at this moment. If you need more information let me know.

Posted: Fri Jun 08, 2007 12:29 pm
by I_Server_Whale
uegodawa wrote:I've done similar kind of application long time ago. But don't have source code at this moment. If you need more information let me know.
uegodawa,

Great! Could you please elaborate on that. I really would like to know more. Thanks much.

Craig!, Many thanks for your response. They help. :)

Whale.

Posted: Fri Jun 08, 2007 1:03 pm
by uegodawa
Okay here are the steps you need to follow (I've done this for Windows environment. If you have to run this on Unix you may need to similar .ksh or.sh files);

Step 1:
Call the dsjob comannd with -ljobs parameters ( you can get the syntax when you just type dsjob command
C:\Program Files\Ascential\DataStage7.5.1>dsjob
Command Syntax:
dsjob [-file <file> <server> | [-server <server>][-user <user>][-passwo
d <password>]]
<primary command> [<arguments>]

Valid primary command options are:
-run
-stop
-lprojects
-ljobs
-linvocations
-lstages
-llinks
-projectinfo
-jobinfo
-stageinfo
-linkinfo
-lparams
-paraminfo

Then store this job names in text file. you can redirect the output into a text file.

Step 2 : Read the job names and get the job status;

C:\Program Files\Ascential\DataStage7.5.1>dsjob -jobinfo
Invalid arguments: dsjob -jobinfo [-useid] <project> <job|jobid>


Once you get the job status, you can pass those values to front-end application which displays : Project Name , Job Name and Job Status.

This may not be what exactly you are looking for, but just

Posted: Fri Jun 08, 2007 1:23 pm
by thamark
This may not be what exactly you are looking for, but just an alternative.

There is a option in the Datastage Director --> View --> Show Categories.

Disable this option and sort the entries by started timestamp column, so it would show everything in order of execution....

Posted: Fri Jun 08, 2007 4:45 pm
by ray.wurlod
If you have 3000 jobs in the project, it will take a serious amount of time (minutes rather than seconds) to gather these data - before you disable view of categories go into Tools > Options and change the refresh interval to, say, 600 seconds. Change it back, if desired, when you've re-enabled display of Category.

The short answer is still no. There is no way that the GUI can display any object in other than the category it is in. Category is a property of the object, not the other way around, and can not readily be changed dynamically.

Re: Director view

Posted: Fri Jun 08, 2007 8:06 pm
by JoshGeorge
Moving the instance of common jobs being called to respective sequence folders will be a no from DS director point. In the main sequence you can drill down to all the sub jobs by right clicking on the job run info log and opting for 'related log' . If the purpose is to see the entire related log in the specific sequence, best solution will be to run a common after job routine after all the sub jobs and make it write what ever information to the main sequence log. This way you don't have to drill down or move between folders/categories to see specific logs.
I_Server_Whale wrote:if it is at all possible to view these common jobs under the specific ETL process folder/category