search variable

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
lak4u
Participant
Posts: 43
Joined: Mon Nov 03, 2008 10:00 pm

search variable

Post by lak4u »

Hi,

any way to search a DataStage project to find all the jobs where a project variable is being used?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Export it and then search the .dsx file.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Kim Duke has posted this query very long back

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),'YOUR SEARCH STRING',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
;

lak4u
Participant
Posts: 43
Joined: Mon Nov 03, 2008 10:00 pm

Post by lak4u »

chulett wrote:Export it and then search the .dsx file.
Thank you Chulett
lak4u
Participant
Posts: 43
Joined: Mon Nov 03, 2008 10:00 pm

Post by lak4u »

Thanks for info.Where do I execute this?
DS_SUPPORT wrote:Kim Duke has posted this query very long back

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),'YOUR SEARCH STRING',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
;

chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From the Administrator's command window or at a TCL prompt, making sure you are connected to the proper project. Use LOGTO if you are unsure.

Code: Select all

cd $DSHOME
. ./dsenv 
./bin/dssh
LOGTO <YourProject>
Or you can skip the LOGTO if you launch the session from the Project in question:

Code: Select all

cd $DSHOME
. ./dsenv 
cd <YourProject>
$DSHOME/bin/dssh
ps. If you ever start a session and it tells you the directory is 'not set up' for DataStage and asks if you want to do that - say NO. It means you are launching from the wrong place, it needs to be done from $DSHOME or a Project directory.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lak4u
Participant
Posts: 43
Joined: Mon Nov 03, 2008 10:00 pm

Post by lak4u »

chulett wrote:From the Administrator's command window or at a TCL prompt, making sure you are connected to the proper project. Use LOGTO if you are unsure.

Code: Select all

cd $DSHOME
. ./dsenv 
./bin/dssh
LOGTO <You ...[/quote]

Thank you Chulett.Now I am able to do it from DS Admin Commend
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Administrator client Command window does not permit execution of a LOGTO command.

A number of other commands, such as HELP, are also blocked, perhaps because they require terminal handling characteristics, perhaps because they are dangerous (for example QUIT).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply