Error while renaming

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
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Error while renaming

Post by richdhan »

Hi,

Iam trying to rename a job but while renaming Iam getting the error "The name <job_new_name> is already is use". How do I find the job with this name in the Datastage Manager. We have a lot of categories for jobs and all the categories are nested to many levels.

If I would do an export of all jobs I will know the category where the job exists but is there any other short way by which we can find out in which category a job exists given the job name. Is there a UV command that I can execute or any other means by which I can find the category.

Thanks in advance.

--Rich
MaheshKumar Sugunaraj
Participant
Posts: 84
Joined: Thu Dec 04, 2003 9:55 pm

Post by MaheshKumar Sugunaraj »

Hi Rich,

I am really not sure if this is a better way but you could try this,

Step 1: Goto the Unix box and Data Stage home directory and type in the following command

dsjob -ljobs <ProjectName>

which will give all the jobs asscociated with the project,

Step 2: You could do

dsjob -ljobs <ProjectName> > <filename>

Step 3: do a Grep on the file

more <FileName> | grep <NameLike>

Hope this helps,Incase you find a better way let me know.

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

Post by chulett »

You can also do a couple of things from the Director.

1. Turn off the display of Categories. :wink: It may take awhile to show all jobs in a large project with this option off, but it will help find what you are looking for. You may want to dial up the refresh interval before you do this so it doesn't try to pull the whole list in every 5 seconds.

2. Use the Filter, Luke! There is a 'Filter Entries' menu item that will allow you to limit the display of jobs to only those that match your pattern. It should work fine with or without Categories turned on, I believe.
-craig

"You can never have too many knives" -- Logan Nine Fingers
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Craig & Mahesh,

I found a better solution. I used the Export option in Datastage Manager. In the 'Option' tab I selected 'By Individual Component' and then exported the job. I opened the DSX file with notepad and searched for Category. The search showed me in which Category the job was existing.

Anyway thanks for your replies & time.

--Rich
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Overkill.

All you needed was

Code: Select all

SELECT NAME, CATEGORY FROM DS_JOBS WHERE NAME = 'MyJobName';
perhaps through the Administrator client Command window.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Ray,

Thanks for the post.
Rich wrote:Is there a UV command that I can execute or any other means by which I can find the category.
As you can see from my first post this is exactly the kind of stuff that I was looking out for.
Mahesh wrote:Incase you find a better way let me know.
Mahesh, Ray's solution seems to be far better way than mine.

--Rich
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Ray,

In Oracle you have the desc command and in SQL/Sybase you have sp_help command to view the structure of the table. Is there a similar command in UV to view the fields used by DS_JOBS.

Thanks in advance
--Rich
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Ray,

I actually found the UV commands in one of Kim's post for another topic.

LIST DICT DS_JOBS.

Thanks Ray & Kim
--Rich

Pride comes before a fall
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you'd like your own name, like sp_help or describe, all you need to do is load up the actual command (use LIST.DICT rather than LIST DICT) in the Administrator client's command window, then save it using your preferred name.

LIST.DICT has the ability to prompt for the hashed file name if it does not appear on the command line.
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