Page 1 of 1

Category Creation

Posted: Wed Sep 07, 2011 7:47 am
by GJ_Stage
Hi All,

I wanted to create subcategories using unix server (not in datastage Client) under the below 2 categories.

COMM_DETAIL
DIST_INFO

Need to create Like below:

COMM_DETAIL
TESTING
INFORMATION
FINAL
DIST_INFO
FIRST_TESTING

Please tell me what is the command need to use?

Posted: Wed Sep 07, 2011 5:11 pm
by ray.wurlod
Why "in UNIX"? The DataStage Designer client is the correct tool for doing this. Categories do not exist in UNIX - they exist in databases.

More than that, they would need to be created both in the local project repository and in the common metadata repository. It's quite likely that these are on separate machines!

Posted: Wed Sep 07, 2011 10:36 pm
by GJ_Stage
Thank Ray.

I wanted to create more sub categories and Datastage Client sometime very slow , So It is taking more time. This is the reason , is there any way is there in backend to create sub categories.

Posted: Thu Sep 08, 2011 12:20 am
by ray.wurlod
In version 7, which you are on, there is. But it won't work when you move up to version 8.

Category definitions are stored in the DS_JOBS table for jobs, the DS_ROUTINES table for routines, and so on for other object types.

The category record always has the same structure.
The key is "\\\" followed by the category, for example \\\\Jobs\DIST_INFO
Field #1 is "NRO" (not read only)
Field #2 is empty and must remain so
Field #3 is the category, for example \Jobs\DIST_INFO

There are two ways to insert new records; using SQL or using UVwrite. To do either of these from UNIX you must be attached to the project directory and have $DSHOME/bin in your PATH. I will assume that these conditions have been met.

You would execute this using the uv or dssh executable.

Code: Select all

dssh "INSERT INTO DS_JOBS(NAME, READONLY, OLETYPE, CATEGORY) VALUES ('\\\\Jobs\DIST_INFO\FIRST_TESTING', 'NRO', '', '\Jobs\DIST_INFO\FIRST_TESTING') ;"
UVwrite is rather more dangerous, since it's a destructive overwrite. Arguments are the hashed file name, the key value, the field #1 value, the field #2 value, and so on.

Code: Select all

UVwrite DS_JOBS '\\\\Jobs\DIST_INFO\FIRST_TESTING' 'NRO' '' '\Jobs\DIST_INFO\FIRST_TESTING'