Unexplained behaviour using DB2 connector

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Just because it is now an "environment variable" doesn't mean it no longer needs to be passed to the job as a job parameter... you've simply changed the source of the value, not how it is used in the job.

Typically, one would now have the value locally as $ENV so that it can come in from the job's environment when it starts up.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sec105105
Participant
Posts: 44
Joined: Fri Mar 20, 2009 7:21 am
Location: Ottawa

Post by sec105105 »

Well, I rebuilt the job from scratch, having only $T_Schema in the parameter list, and #$T_Schema# used in my SQL code within the DB2 connector. This is what the end result of the original job was (T_Schema gone, $T_Schema everywhere), yet the original job kept failing.

Somewhere, the job/connector was still utilizing T_Schema , and that's what I was hoping to locate.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK... sounds like you never did but after rebuilding it again it now works? In your shoes I probably would have exported the job and then gone through the dsx with an editor to see if you could find where it was still referencing the old name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sec105105
Participant
Posts: 44
Joined: Fri Mar 20, 2009 7:21 am
Location: Ottawa

Post by sec105105 »

Yes, after a complete rebuild from scratch, it's working.

Exporting: that was one of the first things I did - could not find any reference to the bare T_Schema variable, except in the parameter section where $T_Schema was listed.

As a result, I'm fearful that SQL code using old parameters hangs around somewhere, causing problems when the parms are changed.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I've seen that behaviour in the past where it squirrels away a copy somewhere unexpected. In the Old Days you could right-click on the stage and select 'Grid View' and find it sometimes, don't think that's an option any more. Kind of surprised that it didn't show up in an export of the job. Ah well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sec105105
Participant
Posts: 44
Joined: Fri Mar 20, 2009 7:21 am
Location: Ottawa

Final note....

Post by sec105105 »

If you drop the connector entirely, and rebuild from scratch, problem disappears. Whatever old code is behind the scenes gets discarded when the new one is built.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course. Closing this topic out with a 'Work Around' status.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply