How to get DS object name

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
arunverma
Participant
Posts: 90
Joined: Tue Apr 20, 2004 8:20 am
Location: MUMBAI
Contact:

How to get DS object name

Post by arunverma »

Dear All ,

We have one requirement , If any column used in jobs,hash file , routine etc , then find all the objects name .

For Ex:- Two Emp_Code,Emp_Name .

EMP_CODE - NUMERIC(5)

1. First Job extracting data from empmaster and create sequential file .
2. Second job create hash file with using KEY - emp_code.
3. Third Job - Use hash file and load additional data into table , here also esing emp_code .


Now As per new requirement , we need to increase field length of emp_code from NUMERIC(5) to NUMERIC(7) .

So we need to list out all the job , hash file etc wherever using emp_code column . then only we start changing .

Pl help .

Regards
Arun Verma
Arun Verma
Andal
Participant
Posts: 124
Joined: Thu Dec 02, 2004 6:24 am
Location: Bangalore, India

Post by Andal »

You can easily get this, If you search the posts, posted by Kim Duke. Else there is a utility called "Search a dsx file for a string" in www.anotheritco.com posted by chucksmith.




Rgds
Anand
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Provided you've been diligent preserving the connections between table definitions in the Repository and in your jobs, you can do a Usage Analysis on the table definition in which the column occurs. This should reveal all the jobs in which it is used.
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 »

The problem that the table name can be all lower case, all upper case or a mixture.

You need to change :1 into your table name in upper case. This SQL is a part of EtlStats. It is called DsSearch1.sql. It is executed by job GenHtmlFromSqlDriver. Put your tablename in parameter named Replacements. It can email you the results if setup properly.

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),':1',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
Post Reply