Page 1 of 1

Need help with design

Posted: Thu Nov 20, 2014 3:18 am
by sarathchandrakt
We have a DataStage process that accepts tilde delimited test files and generates an XML files. Currently we have three interfaces (lets say a,b,c) each processing at different times. Shown below is the schedule of each of the interface process

Interface Schedule
A 9am, 3pm, 9pm
B 7:30am, 10:30am, 5:30pm, 8:30pm
C 8:00am Every hour till 8:00pm


I need to design a process(using scripts and datastage) that,
1. should send out an alert email to the group if more than one file is missed by any of the interfaces.
2. Also the process should send out an email if a files received is not processed as per the schedule.

The scheduled run of the interfaces is in a table format for the ease of adding new interfaces or changing the timing of the existing interfaces. So we can get the Interface name and scheduls from there.

Important: I thought of adding the schedule run time into a tabl everytime a ile is processed. But I am not allowed to make changes in old jobs/process in any way.

Can you suggest me an approach?

Posted: Thu Nov 20, 2014 10:03 pm
by kduke
It is easier to check for files in a shell script. You can run the script before the job in a sequence so they are linked together.

Code: Select all

if [ ! -f file ]
then
   echo "Error: file does not exist"
   exit 3
fi
The -f checks for a file. The ! says if file does not exist. Any exit other than 0 says the script failed. The job sequence will see that the script failed. You can email anybody you want after that.