Transfmer without an input link?

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
georgesebastian
Participant
Posts: 83
Joined: Tue Dec 19, 2006 8:38 am

Transfmer without an input link?

Post by georgesebastian »

Hi Everyone,

Will transfmor work with out an input link?
I know 1 way using stage variable and using constraint
Like @inrownum <1

Heard there are other ways can any one tell me?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, there's no other way. You need a stage variable so the job will compile and a constraint so it doesn't generate an infinite number of rows. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

He didn't tell you because there is no other answer. A least I've never heard of one. Trick question. Be happy to be proven wrong, however!
-craig

"You can never have too many knives" -- Logan Nine Fingers
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

I agree ! U can have transformer without any input link but u will need to put a constraint in it and that you can do only through a stage variable and the reason is simple - there is no input :D
rafik2k
Participant
Posts: 182
Joined: Wed Nov 23, 2005 1:36 am
Location: Sydney

Post by rafik2k »

Good post!
I was also thinking to post the same.

Thanks georgesebastian :)
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

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

Post by ray.wurlod »

Observation: @INROWNUM < 1 will "work" - inasmuch as the job will compile and run without error, evaluating its stage variable(s) - but will not generate any rows.

The "other way" is probably to have a before-stage or after-stage subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not generating any rows may be exactly what you want. I typically do that for either zero rows with an @FALSE constraint or for one row with @OUTROWNUM=1 constraint. The former might be used to clear a hashed file or truncate a table, for instance - the latter to trigger something 'special' in an OCI stage or for the STP stage.

Hadn't thought about the routine... a 'no op' routine perhaps? Its only purpose would be to appease the compiler, it would seem.
-craig

"You can never have too many knives" -- Logan Nine Fingers
baglasumit21
Participant
Posts: 132
Joined: Wed Mar 01, 2006 11:12 pm
Location: Pune

Re: Transfmer without an input link?

Post by baglasumit21 »

georgesebastian wrote:Hi Everyone,

Will transfmor work with out an input link?
I know 1 way using stage variable and using constraint
Like @inrownum <1

Heard there are other ways can any one tell me?
@inrownum wont work as there is no input link and it wont generate the row. your constraint should be @outrownum<2
SMB
Post Reply