How to list the Job names under the category?

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

videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

How to list the Job names under the category?

Post by videsh77 »

Hi

For a given a category name I want to list the job names under that particular category. How we can achieve this task using universe shell?

regards,
Thanks with regards,
videsh.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Most brain dead way:

Code: Select all

SELECT NAME FROM DS_JOBS WHERE CATEGORY = 'YourCategory';
You'll get one extra record for the category itself, can't remember the magical syntax to exlude that from the list. I'm sure it will be along shortly. :wink:
-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 FROM DS_JOBS WHERE CATEGORY = '<<Category name>>' AND NAME NOT LIKE '\\%';
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 »

Doh! And here I thought you needed some of that goofy 'matches' syntax for this. That was too simple. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
just4geeks
Premium Member
Premium Member
Posts: 644
Joined: Sat Aug 26, 2006 3:59 pm
Location: Mclean, VA

Post by just4geeks »

ray.wurlod wrote:

Code: Select all

SELECT NAME FROM DS_JOBS WHERE CATEGORY = '<<Category name>>' AND NAME NOT LIKE '\\%';
Where does one execute this command? Thanks....
Attitude is everything....
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

In datastage administrator or from unix by going into uv command prompt and logging onto your project.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

Yes the command provided listing the jobs under any particular category. But if any other categories are under this category, it is not able to list the jobs under them.

How can we list the jobs recursively under categories for a provided category.
Thanks with regards,
videsh.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

We can get those by

select NAME from DS_JOBS where CATEGORY like '<Category Name>%'
Thanks with regards,
videsh.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

videsh77 wrote:We can get those by

select NAME from DS_JOBS where CATEGORY like '<Category Name>%'
I don't think so. :?:
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

It seemed to me worked. Yes also if you have filter like ray mentioned -

Code: Select all

NAME NOT LIKE '\\%'
have it in query then, it eliminates some unwanted rows.

Now once I get this listing I am redirecting this to a file. But I have seen the column information is getting wrapped. How to avoid this wrapping of column info?
Thanks with regards,
videsh.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

videsh77 wrote:But I have seen the column information is getting wrapped. How to avoid this wrapping of column info?
What do you mean by that? Do you mean the column name, thats just first two lines, you can delete the first two lines.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

Even better -

Log on to the Datastage Manager .

Navigate to the category.

Select all the jobs underneath it.

DO Usage Analysis (its under tools).

When the window opens up , say View HTML.

:D
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Will that display the job in the sub categories too.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

Nope the datastage Manager one will not..it will show only the ones which u selected. :(
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Neither does the other one.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Post Reply