How to retain the data of the Hash file when the sourceempty

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
Mandar_Deshpande
Participant
Posts: 12
Joined: Wed Mar 02, 2005 1:59 am

How to retain the data of the Hash file when the sourceempty

Post by Mandar_Deshpande »

Hi All,

I have 2 sets of job in first jobs i am creating a sequential file,
and in the second job i will be using this sequential file to load the Hash file, but the second job should not get executed when the output of the first job i.e sequential file is empty because what happens is when my source file for the second job is empty the data in the hash file is getting overitten with empty sequential file i.e no data in my hash but my requirement is the hash file shouldnt loose the data when the source is empty.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It sounds like you have the "clear file" option set when writing to the hash file. If you uncheck this then the file's contents will not get deleted on subsequent runs.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Mandar_Deshpande,

But what if the source file did have rows. If you then want to clear rows, I assume the requirement can be solved by performing a 'wc -l' on your seq file to determine the flow.
Post Reply