Page 1 of 1
Need to search a Sequential file for example x.csv in jobs
Posted: Wed Oct 29, 2008 6:03 am
by Kalyana Chakravarthy
Need to search a Sequential file for example x.csv where all it is used in the jobs and can I get using Datastage.Is it possible using this Datastage.
Kalyan
Posted: Wed Oct 29, 2008 6:34 am
by chulett
Did you import the metadata for that file and use that metadata in your jobs? If so, then Usage Analysis should work. Otherwise, export the project to a dsx file and search the export for that string.
Posted: Wed Oct 29, 2008 9:17 am
by ray.wurlod
Code: Select all
SELECT NAME FMT '32L', CATEGORY FMT '40L' FROM DS_JOBS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL "@RECORD" LIKE '%x.csv%');
Posted: Wed Oct 29, 2008 9:18 am
by chulett
Or that.
![Laughing :lol:](./images/smilies/icon_lol.gif)
Posted: Tue Nov 11, 2008 3:17 pm
by Lotus26
Hi Ray
I was trying to run this query
SELECT NAME FMT '32L', CATEGORY FMT '40L' FROM DS_JOBS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL "@RECORD" LIKE '%x.csv%');
But it is failing
DataStage/SQL: syntax error. Unexpected symbol. Token was "@RECORD".
Any suggestions?Thanks in advance.
Posted: Tue Nov 11, 2008 4:24 pm
by ray.wurlod
None. It works fine for me.
Posted: Tue Nov 11, 2008 6:14 pm
by chulett
Make sure you are in a Project - either issue a LOGTO YourProject or launch the shell from inside the project directory so it is automatically logged into the right project.
Posted: Wed Nov 12, 2008 9:31 am
by Lotus26
Yes..It worked for me .But a small syntax change like I have used:
/dsadm/Ascential/DataStage/DSEngine/bin/uvsh "SELECT NAME FMT '32L', CATEGORY FMT '40L' FROM DS_JOBS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL '@RECORD' LIKE '%x.dat%');"
Thanks for all your suggestions.
Posted: Wed Nov 12, 2008 11:04 am
by chulett
Because you needed to look for a dat extension rather than csv? Ok. Mine worked fine with both "@RECORD" and '@RECORD' so that doesn't seem to be signficant.
Posted: Wed Nov 12, 2008 12:59 pm
by Lotus26
I am having one more question . Can we find out like in what job a particular dataset is used in the same way or will there be a different query or way for that?
I would really appreciate any suggestions.Thanks in advance.
Posted: Wed Nov 12, 2008 1:07 pm
by Lotus26
Sorry ..I did tried with the same query and was able to find out the job names .
Thanks for all your help and suggestions.