DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
dickfong
Participant



Joined: 15 Apr 2003
Posts: 68

Points: 229

Post Posted: Sun Apr 25, 2004 11:44 pm Reply with quote    Back to top    

DataStage® Release: 6x
Job Type: Server
OS: Unix
I have a simple job which has one input stream from a sequential file. A transformer which takes in the source and have mulitple lookup hash files attached to it. The logic is simple but it would output data to the same hash file when matching different lookups.

What I need to do is to clear the target hash file before writting any data into it. So shall I check any of the 'clear hash' checkbox in my target hash file to do so or do I need a seperate before-job routine or else?

Please advice. Thanks a lot.

DF
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54038
Location: Sydney, Australia
Points: 293144

Post Posted: Mon Apr 26, 2004 1:58 am Reply with quote    Back to top    

Set your rule to "clear file before writing" on the Hashed File stage's Input link.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42217
Location: Denver, CO
Points: 216760

Post Posted: Mon Apr 26, 2004 8:27 am Reply with quote    Back to top    

Hmm... an airport lounge drive-by. Technically, your answer is that you can check any one of the input links to the hash file to accomplish the task of clearing of it. When a job star ...

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
tonystark622



Group memberships:
Premium Members, Heartland Usergroup

Joined: 12 Jun 2003
Posts: 483
Location: St. Louis, Missouri USA
Points: 2880

Post Posted: Mon Apr 26, 2004 2:49 pm Reply with quote    Back to top    

I have seen jobs designed to read from the null device (/dev/null for Unix) and write to the hash file with Clear before writing checked. This is placed at the beginning of the job with other "dummy" activities to ensure that it happens before anything else.

Tony
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54038
Location: Sydney, Australia
Points: 293144

Post Posted: Mon Apr 26, 2004 11:58 pm Reply with quote    Back to top    

Yes, I missed the "multiple inputs" part of your requirements. The problem now is that you do not know which link will fire first. If you do, check "clear file before writing on that link". Otherw ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
tonystark622



Group memberships:
Premium Members, Heartland Usergroup

Joined: 12 Jun 2003
Posts: 483
Location: St. Louis, Missouri USA
Points: 2880

Post Posted: Tue Apr 27, 2004 6:51 am Reply with quote    Back to top    

Hi Ray!

I don't directly copy the contents of /dev/null to the hash file, I "read" it from a sequential file stage, through a transformer and output to the hash_file that needs to be initilialized. I have all the metadata defined in the transformer and hash file stages and the hash file is marked "Clear file before writing" and "Create File". This sequence of stages is either in a separate job, or at the beginning of a job so that it happens before anything else happens.

Tony
Rate this response:  
Not yet rated
MounikaP



Group memberships:
Premium Members

Joined: 06 Nov 2017
Posts: 6

Points: 38

Post Posted: Mon Nov 06, 2017 4:36 am Reply with quote    Back to top    

ray.wurlod wrote:
Yes, I missed the "multiple inputs" part of your requirements. The problem now is that you do not know which link will fire first. If you do, check "clear file before writing on that link".
Otherwi ...


Even though i am the premium member, I could not see the full message. Could you please help me with the complete message posted.

_________________
Thanks and Regards,
Mounika P
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42217
Location: Denver, CO
Points: 216760

Post Posted: Mon Nov 06, 2017 7:14 am Reply with quote    Back to top    

If you just paid for a membership, you'll have to wait for that to be setup before you can see any premium content. If you look at the left-hand side of the forums where the names are displayed, you'll see that it hasn't been activated. Yet.

_________________
-craig

Watch out where the huskies go and don't you eat that yellow snow
Rate this response:  
Not yet rated
MounikaP



Group memberships:
Premium Members

Joined: 06 Nov 2017
Posts: 6

Points: 38

Post Posted: Mon Nov 06, 2017 10:03 am Reply with quote    Back to top    

Okay.. thanks... I shall wait for my status to get updated.

_________________
Thanks and Regards,
Mounika P
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54038
Location: Sydney, Australia
Points: 293144

Post Posted: Mon Nov 06, 2017 2:43 pm Reply with quote    Back to top    

tonystark622 wrote: I have seen jobs designed to read from the null device (/dev/null for Unix) and write to the hash file with Clear before writing checked. FYI, under the covers the CLEAR ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours