How to know whether a DS job is referenced by sequencer ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

How to know whether a DS job is referenced by sequencer ?

Post by yiminghu »

Hi,

I have this headache problem. We're in the process of promoting our DS Jobs to production, but we found out there are lots of messy jobs in the project. Those are the test jobs created by developer during their development and tesing. Some jobs do not have very good naming standards, by looking at names, it is very hard for us to know whether this job is test job or not.

One thing we're quite sure, any valid DS job(not including sequencer) will be referenced by a sequencer or another job. I wonder whether there is any quick way to know whether the job is referenced by other jobs or not?

Thanks,


Carol
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Here is the SQL to get sequences. This is not 100% because this relies on the job dependencies in the job properties.

Code: Select all

SELECT 
   NAME,
   CATEGORY,
   EVAL "TRANS('DS_JOBOBJECTS','J\':@RECORD<5>:'\ROOT',31,'X')" AS DEPEND_JOBS FMT '35L',
   EVAL "if TRANS('DS_JOBOBJECTS','J\':@RECORD<5>:'\ROOT',40,'X') = '2' then 'Y' else 'N'" AS SEQ
FROM 
   DS_JOBS
WHERE
   SEQ = 'Y'
ORDER BY
   NAME
;
Mamu Kim
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Another method would be to search for the job name in all other jobs.

You would need to modify this SQL.

Code: Select all

SELECT 
   DS_JOBS.NAME AS JOB_NAME, 
   DS_JOBS.CATEGORY, 
   DS_JOBOBJECTS.NAME AS OBJECT_NAME, 
   DS_JOBOBJECTS.OLETYPE, 
   EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'KGD',1) > 0 then 'FOUND' else ''" AS FOUND FMT '5L'
FROM 
   DS_JOBS, 
   DS_JOBOBJECTS 
WHERE 
   DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO 
   and FOUND = 'FOUND'
GROUP BY
   JOB_NAME, 
   DS_JOBS.CATEGORY, 
   OBJECT_NAME, 
   DS_JOBOBJECTS.OLETYPE, 
   FOUND
;
Mamu Kim
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Post by yiminghu »

Thanks a lot for your quick response.

I'm little bit confused about your solution. Shall I ran those query in Administrator/command window? What does @Record mean?

It there any manuals about those System tables such as DS_JOBS etc? I could find it in Admistrator Guide.

Thanks again.

Carol
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can run these commands in Administrator but I prefer to telnet into the DataStage server and run them at TCL. Do a search this has been explained before. All you need to do is run the uv command in the DataStage server bin directory. You will need to be in the project directory. You could also use LOGTO if you want to research that.
Mamu Kim
yiminghu
Participant
Posts: 91
Joined: Fri Nov 14, 2003 10:09 am

Post by yiminghu »

Hi Kim,

I'm not quite familiar with the command you were using. Can you tell me where I can get this kind of refernece marterial for those commands?

Regards,

Carol
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The uv command is the same as sqlplus for Oracle. It is the command line way to interface with the Universe database. It is also called TCL. The Universe database is owned by IBM now. You can downlaod the manuals and even the database itself on their site. Ray posts the links for all these. You can do a search and find them.
Mamu Kim
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

After you determine your minimum set of jobs, I have a tool that will help you determine which routines are used by those jobs. Its input is a dsx file of those jobs. The tool is List routines called by jobs and routines in a dsx file. You may find it on the DataStage Tools page of www.aotheritco.com.
Post Reply