Write a file without 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
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Write a file without input stage

Post by talk2shaanc »

I want to write into a hash file some, default/constant values(I will be hardcoding this in transformer stage), So we can say that no input stage is passing data to transformer stage.

Code: Select all

Trans ----> Hashfile
Can I have a design like above without having any primary input stage? well while compilation i will get error with the default properties of the job. But is it possible to get it with setting of some special properties , for the job ??
Shantanu Choudhary
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, do this all the time to generate data. Two things you need to know:

1) Your transformer needs a Stage Variable defined. You never need to use it, simply define it so the job will compile.

2) Make sure you put a Constraint in the transformer or the job will run forever. Simplest way is to constrain via the @OUTROWNUM system variable. If you want 10 rows in your hash, for example, put in your constraint:

Code: Select all

@OUTROWNUM <= 10
It will insert the 10 rows and then stop. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Thanx a lot,
the only missing thing was, stage variable. :)
Shantanu Choudhary
Post Reply