Page 1 of 1

To identify whch job uses the corresponding hashed files.

Posted: Mon Aug 24, 2009 2:54 am
by satheesh_color
Hi All,

We have a set of hashed files, we will need to identify which hashed files is used by the job.

The reason is we have around 2000 jobs.So we need to find out which job uses the corresponding hashed file as a lookup.


Please let me know your thoughts.


Thanks,
Satheesh.

Posted: Mon Aug 24, 2009 5:37 am
by chulett
Chuck Smith publishes a free 'tool' on his website that would help with this. A search here for OLETYPE might turn up a query you could modify to do this as well.

Re: To identify whch job uses the corresponding hashed files

Posted: Mon Aug 24, 2009 6:07 am
by PhilHibbs
I just wrote this (got it right first time! from memory!):

Code: Select all

perl -ne "$j=$_ if /^   Identifier/; if (/^ +Name/){$n2=$n1;$n1=$_} print $j.$n2.$n1 if /FileName .FILE_NAME_HERE./"<dsx_file_name.dsx
needs Perl of course.

Insert your hashed file name in between the dots, and your dsx file name after the <. It will print out the job name, stage name, and link name of the Hashed File stage. There may be some circumstances under which it prints the wrong stage name, but this is very unusual.

Posted: Mon Aug 24, 2009 6:13 am
by chulett
Or that. :wink:

Thanks Phil, I'll have to give that a go later on a spare dsx I have hanging around.

Posted: Mon Aug 24, 2009 6:16 am
by PhilHibbs
chulett wrote:I'll have to give that a go later on a spare dsx I have hanging around.
Just fixed a bug, so I was mistaken about "right first time". Also it will get the Stage Name wrong if there are multiple links to the stage.

*Update*:

Code: Select all

perl -ne "$j=$_ if /^   Identifier/; $o=/CHashedFileStage/ if /^ +OLEType/; $on = $_ if $o and /^ +Name/; $n = $_
 if /^ +Name/; print $j.$on.$n if /FileName .FILE_NAME_HERE./"<dsx_file_name.dsx