Category Creation

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Category Creation

Post 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?
Jothi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Post 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.
Jothi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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'
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