Need to check if two files exist then only process?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ramakrishna459
Participant
Posts: 37
Joined: Tue Mar 26, 2013 12:02 pm
Location: INDIA

Need to check if two files exist then only process?

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to use the "Wait for file" activity for both files in your job sequence.
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

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

Post by Klaus Schaefer »

Did you try "wait for file" event in job sequencer...?

Klaus
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Two WaitForFile activities with OK triggers feeding into an "All" sequencer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... think I'm leaning towards suggesting two WFF stages in a Sequence for this.

:wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ramakrishna459
Participant
Posts: 37
Joined: Tue Mar 26, 2013 12:02 pm
Location: INDIA

Post by ramakrishna459 »

we have created unix shellscipt and worked out. Thanks to all
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not trade in your copy of DataStage for a UNIX shell script author?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply