Manipulating and managing the Template project

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Manipulating and managing the Template project

Post by bcarlson »

Is there a way to manage and manipulate the Template project within any of the DataStage applications (Administrator, Manager, etc.)?

Dealing with project-level parameters is no problem, I can do that with the DSParams file - I create a project, setup the environment variables the way I want them and then copy the DSParams file in the Template dir so that new project adopt the same env. vars.

The problem I am running into is that there is a Before routine that we would like to have in every project. We have manually imported it into every existing project, but I would really like to figure out a way to have it built into the Template project so that new project automatically include the routine.

Any suggestions? Also, where would I find documentation on this Template project and how to use it?

Thanks, in advance, for the help!

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

Post by ray.wurlod »

It's not documented anywhere. The project template is - effectively - a regular project but without a VOC. Thus there's no way you can get into the DataStage environment in the template "project".

You could, of course, create a pointer to the template's DS_ROUTINES table from another project, and then copy the routine from where it currently is.

Code: Select all

SETFILE /path/of/Templete/DS_ROUTINES TEMPL_ROUTINES
COPY FROM DS_ROUTINES TO TEMPL_ROUTINES RoutineName
I have not tried this, and it may not work (though it should). It may even affect your warranty. If it works, next time you create a new project, the extra routine should be in it.

When you upgrade to a new release, however, you get a new DS_ROUTINES in your template, and would thus lose your customization, so be prepared to re-do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Hmmm, I can think of something else now that I will put on my wish list and post in the enhancements forum - DataStage application access to the Template project.

I think I understand logically about the linking, but I don't recognize the syntax of the code you posted. What is it and what exactly does it do?

Brad.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

[quote="ray.wurlod..The project template is - effectively - a regular project but without a VOC...[/quote] Oddly enough I was looking into that project earlier today and noticed that all of the indexed files have invalid indices as well; so DS force-fixes them when copying.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You know about SETFILE from numerous discussions here. It creates a pointer to a remove hashed file in the current project's VOC file.

COPY is a "UniVerse" command for copying a record from one table to another. It's easier to use than SQL for entire records. In this case you are copying the record whose key is the routine name from the project's DS_ROUTINES table into the DS_ROUTINES table in the Template project.

If, as Arnd says, the indexes in the Template project are invalid, you will need to rebuild the indexes before the COPY command will work.

Code: Select all

BUILD.INDEX TEMPL_ROUTINES ALL
(However, on the system I'm using this week, the indices on DS_ROUTINES in the Template were all valid.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You will need to use SET.INDEX first in order to fix the indices.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

As noted, I didn't. 7.5.1A on Red Hat AS3.0 Linux.
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