Hashed file and routine

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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Hashed file and routine

Post by snassimr »

Hi !

I try to do some things :

in transformer output side of it i have a derived field that must use value from hashed file

<<target column>> = @inRowcount + <<Link to hashed file>>.Count

But I want to read <<Link to hashed file>>.Count before and use it for
derivation . I cant to set it as a stage variable !!!

So help me , please
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Can you tell us what issue you are facing when you attempt to do it.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

The value from hashfile is null and all derivation set to null.
May be there is another way to bring the value of "count" to derivation ?
dsdesigner
Participant
Posts: 34
Joined: Thu Jul 29, 2004 1:03 pm

Post by dsdesigner »

If you are getting a null then maybe, you should set it to 0 and add it to the @INROWNUM ??

Thanks
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

But I want to extract value from hash and it isnt 0 there
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Try to view the data and check whether the key value and its format matches.
dsxdev
Participant
Posts: 92
Joined: Mon Sep 20, 2004 8:37 am

Post by dsxdev »

are you trying to create some kind of sequence by getting a count from the hash file and add the row number.

in such how arre you getting the count from the hash file to transformer.

Check the from hash file as soon as you read it by using a peek stage.

If you are getting avalid value then check the data type and nullability. of this column in all stages.
Happy DataStaging
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

dsxdev wrote:Check the from hash file as soon as you read it by using a peek stage.
Now you're mixing your products. Server has Hash files but no Peek stage. EE/PX is vice-versa - no Hash but does have the Peek stage. :wink:

In Server, if you are not sure for some reason what's in a hash file (and you don't feel comfortable trying to query it) you could always write a little job to source it to a flat file and then inspect the flat file.

snassimr - Other than that, there isn't nearly enough information (yet) about what you are trying to do exactly for anyone to do anything other than flounder around and guess to try and help you. What does your hash file look like - structure and contents? How are you setting its Key Expression in the Transformer? Why does the title of your post mention the word 'routine'? :?

Try to explain your problem again in more detail and we'll see what we can do to help.
-craig

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