How to check a Hashed File being used by

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
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

How to check a Hashed File being used by

Post by Titto »

Can anyone tell me how to check a particular Hashed file being used by other jobs in a project.

Thanks
deepa_natarajan81
Participant
Posts: 9
Joined: Mon Mar 28, 2005 12:15 pm

Post by deepa_natarajan81 »

I used DwNav tool. You can download it from tools4datastage.com.
I found it very easy to navigate.
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Let me try the tool :-) But is there a way with out using the tool.
I think there should be some SQL to fetch the jobs using a Hashed files. I tried searching in the forum could not find it.
~
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Provided your metadata management has been disciplined you should be able to select the hashed file's table definition in Manager and perform a Usage Analysis. This will show you everywhere that the table definition has been used in the project.
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 »

DwNav is great. MetaStage should work. This link viewtopic.php?t=94738 will work.
Mamu Kim
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

hi Kim,

Following Select statement got from the link you provided

Code: Select all

select 
   EVAL DS_JOBOBJECTS."@RECORD<6>" AS FILE_NAME FMT '35L', 
   DS_JOBS.NAME AS JOB_NAME FMT '35L', 
   DS_JOBOBJECTS.NAME AS LINK_NAME FMT '35L' 
from 
   DS_JOBOBJECTS, 
   DS_JOBS 
where 
   DS_JOBOBJECTS.OLETYPE in ('CHashedOutput','CHashedInput') 
   and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO 
group by 
   FILE_NAME, 
   JOB_NAME, 
   LINK_NAME 
; 
can you please tell me what are the other columns in DS_JOBOBJECTS and DS_JOBS tables/files..
And Can i create job to read DS_JOBOBJECTS and DS_JOB table using Hash file stage to fetch the data.. is it possible?
Thanks,
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There are some tricks you have to do to SELECT either DS_JOBS or DS_JOBOBJECTS. IBM tries to protect these files. You cannot import metadata from them directly. I usually create a q-pointer which is like a synonym.

ED VOC DsJobs
1:Q
2:
3:DS_JOBS

ED VOC DsJobObjects
1:Q
2:
3:DS_JOBOBJECTS

Now you can import metadata from DsJobs and DsJobObjects. You can use these in a UV stage. So you can extract data this way. The best way to get data out of these files is to create dictionary items. This is a lot more complicated to explain.

As far as what is in files takes a lot of hacking to find out. If you look at the jobs and routines included in EtlStats then you will see a lot more fields used in these tables. I have a few jobs which I extract job names, descriptions, job numbers, categories, sequence flag and update Oracle. I want to run reports for all jobs in a category. Another report is all row counts and run times for all sequences. Most of these just get the last run of each job.

Out of DS_JOBOBJECTS I extract Stage Names, Link Names, Column Names. There is also SQL to create dictionary items. A lot of this has been posted before on this web site.

Most of this is more easily available in Reporting Assistant or MetaStage. DwNav is a product I sell which helps you find these types of things in the data produced by Reporting Assistant. This type of ETL metadata is very valuable and can help you do your job. DwNav does a great job of generating documentation which non-technical people can understand or developers which do not understand DataStage like DBAs. If you are required to create documentation or manage ETL in any way then DwNav, EtlStats and now Parameter Navigator are a huge help.
Mamu Kim
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Hi Kim,

thanks for valuable information. Could you please tell me how to create Q pointers.

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

Post by ray.wurlod »

Search for SETFILE command on this forum.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Please consider my List all files and tables used by jobs in a dsx file tool.

You will find it on the DataStage Tools page of www.anotheritco.com.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

SETFILE is Ray's way of creating q-pointers. The ED editor is my way. I just showed you in the above post. You have to edit the VOC file. You need to learn more about Universe to do these types of things. Not hard at all.
Mamu Kim
Post Reply