Need to search a Sequential file for example x.csv in jobs

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Kalyana Chakravarthy
Participant
Posts: 7
Joined: Tue Jun 20, 2006 3:53 am

Need to search a Sequential file for example x.csv in jobs

Post 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
Kalyanachakravarthy VS
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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%');
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or that. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Lotus26
Premium Member
Premium Member
Posts: 48
Joined: Tue Jul 13, 2004 2:09 pm

Post 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.
Regards
Lotus26
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

None. It works fine for me.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Lotus26
Premium Member
Premium Member
Posts: 48
Joined: Tue Jul 13, 2004 2:09 pm

Post 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.
Regards
Lotus26
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Lotus26
Premium Member
Premium Member
Posts: 48
Joined: Tue Jul 13, 2004 2:09 pm

Post 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.
Regards
Lotus26
Lotus26
Premium Member
Premium Member
Posts: 48
Joined: Tue Jul 13, 2004 2:09 pm

Post 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.
Regards
Lotus26
Post Reply