Job with no "Primary Input" stage

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
tomengers
Participant
Posts: 167
Joined: Tue Nov 19, 2002 12:20 pm
Location: Key West

Job with no "Primary Input" stage

Post by tomengers »

This is probably quite simple ... I want to create a little hash file with some literal values. And I can build these values in the transformer stage, so I have a 2 stage job: xfm => hsh. But the compiler doesn't like it, telling me there is "no primary input stage". Is there a short-cut here or must I build a source file somewhere and then read it in ... ???

thanks ...

... tom
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Tom,

I think you can do what you want to do with Stage Variables... Having said that, I usually just build a little text file and read it in to a hash file for stuff like this... That way if the data ever changes, I just change the file and don't have to recompile the job.

Tony
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I did not think it is possible but it will allow you to have a transform without primary input. You need stage variables. Like x=1 initial value then x=x+1. Next you need a constrait like x<100. Try it. I have seen people do this to create time and day dimensions. Saves coding the whole thing in a batch job. I still prefer batch jobs. Reading and writing to hash files is too easy in BASIC.
Mamu Kim
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If you want literal values, you are better-off putting it in a sequential file and load it via a datastage job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They are right, all you need to do is define a stage variable - even if you don't use it - it needs to be there so the job will compile.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I agree with Kim, it can be done and is useful for the kind of thing envisaged.
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