Page 1 of 1

Error while renaming

Posted: Wed Jul 07, 2004 4:12 am
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

Posted: Wed Jul 07, 2004 5:57 am
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

Posted: Wed Jul 07, 2004 7:09 am
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.

Posted: Wed Jul 07, 2004 8:56 am
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

Posted: Wed Jul 07, 2004 3:51 pm
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.

Posted: Thu Jul 08, 2004 12:25 am
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

Posted: Mon Jul 19, 2004 4:59 am
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

Posted: Mon Jul 19, 2004 6:49 am
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

Posted: Mon Jul 19, 2004 2:51 pm
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.