Problems with Parameters in Datastage 7.0

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
Hemant_Kulkarni
Premium Member
Premium Member
Posts: 50
Joined: Tue Jan 02, 2007 1:40 am

Problems with Parameters in Datastage 7.0

Post by Hemant_Kulkarni »

Hi

We are trying to use Project Level parameters in Datastage 7.0 jobs.

I have created 3 User-defined Variables, SOURCE_DB, SOURCE_USER, SOURCE_PWD, using Datastage Administrator.

In my Datastage job > Job Properties, I have added these environment variables and set the default value as $ENV. (For some strange reason $PROJDEF doesnot seem to work)

This simple datastage job reads from Oracle Source (OCI 9 stage) and populates to the text file. The source query is "Select name from V$database".

When I run this job, the job aborts with the message "Missing Parameters $SOURCE_DB [$ENV] $SOURCE_USER [$ENV] $SOURCE_PWD [$ENV] "

I browsed thru the forums, went thru help docs, and found that Running a job by itself, passing $ENV as the values will abort the job.

I tried to call this job from Sequence, passing $ENV as the parameter value. The job worked fine.

Then I changed values of SOURCE_DB in the Datastage Administrator to point to Test Database.

I ran the sequence again, but this time, the Job fails with error "Missing Parameters $SOURCE_DB [$ENV] $SOURCE_USER [$ENV] $SOURCE_PWD [$ENV] "


My question is

1) How to ensure that the changed values (changes done to variable values in Administrator) are reflected in the jobs

2) Is it really not possible to use $PROJDEF

Datastage 7.5.1A is far better than Datastage 7.0 :) (But I can't do a upgrade now) and these are easy-pezee in Datastage 7.5.1A.

Can you please help me with these.

Regards
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you checked your documentation to ensure that all this functionality is even in the 7.0 release? :?

From what I recall, the initial implementation was pretty weak and it required a recompile to get it to notice changes in values. I don't think it all "works works" until the 7.5 release. Can't say for certain, however, as I didn't start using it until then, so no personal scars from early usage to remind me of the pain...
-craig

"You can never have too many knives" -- Logan Nine Fingers
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Re: Problems with Parameters in Datastage 7.0

Post by JoshGeorge »

Try doing the same with $PROJDEF. Call job from sequence. In the sequence pass $PROJDEF to the project level parameters and pass them to calling jobs job level parameters. If $PROJDEF works that should solve your problem. There is a patch available for this bug.
Hemant_Kulkarni wrote: I browsed thru the forums, went thru help docs, and found that Running a job by itself, passing $ENV as the values will abort the job.
I tried to call this job from Sequence, passing $ENV as the parameter value. The job worked fine.
Then I changed values of SOURCE_DB in the Datastage Administrator to point to Test Database.
I ran the sequence again, but this time, the Job fails with error "Missing Parameters $SOURCE_DB [$ENV] $SOURCE_USER [$ENV] $SOURCE_PWD [$ENV] "
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Hemant_Kulkarni
Premium Member
Premium Member
Posts: 50
Joined: Tue Jan 02, 2007 1:40 am

Post by Hemant_Kulkarni »

Thanks Josh & Craig

$PROJDEF does not work. I don't know why. People tell me that it works in 7.0.1 and not in 7.0

When I give $PROJDEF as default value, the string value "$PROJDEF" is taken as the value for the parameter (which is not what I want).

For eg: Default value for SOURCE_DB, in Administrator, is MYDB1

and I give $PROJDEF as the value in the Job Properties, the Datastage is evaluating the connection string as "$PROJDEF" instead of "MYDB1"

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

Post by ray.wurlod »

What you describe as what you're doing are the correct steps, so we must agree with you that it does not appear to work properly in version 7.0. Any reason not to upgrade to a 7.5 release?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bashbal
Premium Member
Premium Member
Posts: 23
Joined: Mon Mar 01, 2004 12:26 pm
Location: Milwaukee, WI
Contact:

Post by bashbal »

$PROJDEF is definately NOT available in version 7.0. I'm not sure what version was that implemented it, but it is available in 7.5. In fact, it is one of the major reasons we used to justify upgrading 7.0 to 7.5.

With 7.0, you're limited to using default parameter values, or creating an external routine to run jobs with specific parameter values.
Lyle
Hemant_Kulkarni
Premium Member
Premium Member
Posts: 50
Joined: Tue Jan 02, 2007 1:40 am

Post by Hemant_Kulkarni »

Thanks bashbal.

This confirmation certainely helps.

We are now moving to 7.5.1 and I know that $PROJDEF would definetly work there 8)

Thank you all for your support. I will mark this topic as Resolved.
Post Reply