Is there a quick way to create a bunch of categories? Using the interface, I have to wait for DS to read the entire hierarchy every time I create a new category, and I regularly create a similar hierarchy of about 8 all at once. This is very tedious. Is there an Administrator command to create a category?
This is the kind of structure I use:
1.Site Name/1.Vendors/1.Extract
1.Site Name/1.Vendors/2.Transform\010
1.Site Name/1.Vendors/2.Transform\020
1.Site Name/1.Vendors/2.Transform\030
1.Site Name/1.Vendors/2.Transform\040
1.Site Name/1.Vendors/3.Load
1.Site Name/1.Vendors/4.Reports
I no longer use the _J01_, _J02_ job naming convention, but use the categories above to indicate execution sequence.
I'm thinking of creating a dummy job and exporting it, editing the exported file to change the category, and importing it again. I could even automate it, with a script that takes the category name, stuffs it into the export file, and then runs dsimport.exe.
Creating categories
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Creating categories
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Hey may be its risky, use it at your own risk
If you want to create a parent directory named ABCD use:
INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\ABCD','NRO','ABCD')
If a sub directory named ABC under ABCD use:
INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\ABCD\ABC','NRO','ABCD\ABC')
Similarly you can build other Hierarchies.
You can write this within Administrator or with a Routine/Job Control also.
Hope this will help you. Remember its Hacking Only.![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
If you want to create a parent directory named ABCD use:
INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\ABCD','NRO','ABCD')
If a sub directory named ABC under ABCD use:
INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\ABCD\ABC','NRO','ABCD\ABC')
Similarly you can build other Hierarchies.
You can write this within Administrator or with a Routine/Job Control also.
Hope this will help you. Remember its Hacking Only.
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Re: Creating categories
Rather than hacking DS_JOBS, I have created a batch file solution that works very nicely. It is available here. You need to download pslist.exe from sysinternals.com as well, because the dscat batch file uses it to wait for dsimport.exe to finish executing. This way you can create a whole bunch of dscat commands in notepad and paste them all into the command prompt window.
The batch file expects category1.dsx and category2.dsx to be in the current directory, it concatenates them to create a category.dsx, and imports this file creating a job called "category". This dummy job can be deleted. Edit the category1.dsx file to change the name of the job in the unlikely event that you have a job called "category" in your project already!
The server, username, password and project are all hard-coded so you will need to insert these details. It is up to you whether this represents a security problem, if so then remember to remove the password after you have used the utility.
The batch file expects category1.dsx and category2.dsx to be in the current directory, it concatenates them to create a category.dsx, and imports this file creating a job called "category". This dummy job can be deleted. Edit the category1.dsx file to change the name of the job in the unlikely event that you have a job called "category" in your project already!
The server, username, password and project are all hard-coded so you will need to insert these details. It is up to you whether this represents a security problem, if so then remember to remove the password after you have used the utility.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
I have updated my dscat.cmd script in dscategory.zip and now it does not need any additional files - it just creates a .dsx file with a dummy job in the desired category, imports the dsx, then quits. It leaves the .dsx file in the current directory, and it leaves the job called "dummy" in the newly created category (so if you create a load of categories, it just leaves it in the last one created). As it uses Perl, it no longer needs to scan the process list for the dsimport process as Perl can wait for the process to finish natively. It also restores the last-logged-on user in the registry afterwards.
You will need to edit the script to use it - on line 27 the server, user, password, and project are hard-coded.
Is there a file upload area on DSXchange? Or on IBM's web site? I can't find the new equivalent of ADN anywhere, is there one?
You will need to edit the script to use it - on line 27 the server, user, password, and project are hard-coded.
Is there a file upload area on DSXchange? Or on IBM's web site? I can't find the new equivalent of ADN anywhere, is there one?
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can use attachments (up to 5MB, if my memory serves) at IBM DeveloperWorks.
Both sites are planning upload/download capability. Issues relating to viruses, spam and the like are still being worked through: probably some form of moderated area will be implemented.
Both sites are planning upload/download capability. Issues relating to viruses, spam and the like are still being worked through: probably some form of moderated area will be implemented.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
![Idea :idea:](./images/smilies/icon_idea.gif)
Use DataStage/SQL to insert new category records in DS_JOBS. From the operating system use the dssh command, and enclose the SQL in double quotes.
Category records have a key of \\\category, have NRO in the READONLY column and the category in the CATEGORY column. Some examples, for the categories DWH and DWH\Dimensions
Code: Select all
$DSHOME\bin\dssh "INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\DWH','NRO','DWH');"
$DSHOME\bin\dssh "INSERT INTO DS_JOBS(NAME,READONLY,CATEGORY) VALUES ('\\\DWH\Dimensions','NRO','DWH\Dimensions');"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.