Page 1 of 1

Need to check if two files exist then only process?

Posted: Thu Aug 15, 2013 12:02 am
by ramakrishna459
Hi All,

We have two similar groups are split into two xml files.But our datastage job should identify each time whether two xmls of similar group available then only process the records.if only single xml file of that group is available dont process.How to achieve this logic in datastage.

For example:we will have that xml files as fruits_I.xml and fruits_II.xml both belongs to group of '05'.

if only fruits_I.xml and fruits_II.xml are available then only datastage job should process the records to the file.

Posted: Thu Aug 15, 2013 1:09 am
by ArndW
You need to use the "Wait for file" activity for both files in your job sequence.

Re: Need to check if two files exist then only process?

Posted: Thu Aug 15, 2013 2:01 am
by Klaus Schaefer
Did you try "wait for file" event in job sequencer...?

Klaus

Posted: Thu Aug 15, 2013 4:20 am
by ray.wurlod
Two WaitForFile activities with OK triggers feeding into an "All" sequencer.

Posted: Thu Aug 15, 2013 11:22 am
by chulett
Hmmm... think I'm leaning towards suggesting two WFF stages in a Sequence for this.

:wink:

Posted: Sun Oct 13, 2013 7:25 am
by ramakrishna459
we have created unix shellscipt and worked out. Thanks to all

Posted: Sun Oct 13, 2013 1:35 pm
by ray.wurlod
Why not trade in your copy of DataStage for a UNIX shell script author?