Project variables in selection criteria?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
anilkona
Participant
Posts: 50
Joined: Mon Nov 15, 2004 6:18 pm

Project variables in selection criteria?

Post by anilkona »

Can you use project/environment level variables defined in DataStage Administrator in the selection criteria for a DB2 or ODBC stage?

I tried adding project variables as job parameters and used them in the selection criteria like Division_num = '#$DIVISION_NUM#'. When I tried to view data after that, it complained and also did not give me the option to enter the value for the above parameter.

Is this possible in DataStage 7.1 or 7.5? I see that these variables can be used as derivations for a stage variable or a lookup. But I really have to use them in the where clause.

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

Post by ray.wurlod »

Yes, it's possible, but NOT in View Data! You need to provide an explicit value when prompted for the job parameter value. For some reason, the data browser can not pick up the user-defined environment variable - even though it's right there. This is probably a bug. You'll find that they work fine when the job is running.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anilkona
Participant
Posts: 50
Joined: Mon Nov 15, 2004 6:18 pm

Post by anilkona »

But I don't see the parameter in the popup window which displays the job parameters after I click the 'View Data' button.

I can only see the job parameters that I defined specifically for a job but not the ones that I added from the environment.
Post Reply