Hi all,
Is there any command in Unix, which will stop the load process if any error is found in the i/p file?
I am trying to load 5 files sequentially.
A then
B then
C then
D then
E end;
1) If A encounter's any error while data load, the load process should stop, and it should not continue
2) If A load's, then B load's, then C has errors, then it should stop and should not continue to load D and E.
What would we call "load" in normal Unix parlance. I have just started with Unix coding, so i dont know much of these parlance. Would appreciate if you can tell me.
Here's the details:
We have 5 input files, which resided on the Unix server.
We have created a sqlldr script to load the data from input file to oracle table.
The Unix shell script that i created does these things:
1) Looks for the input file, and loads the data into the table, and sends the e-mail to the user along with log file (as attachement), and also counts the total counts in the input file.
If the input file has any error or if the input file is not found in the specified path, then it notifies the user via e-mail alogn with the attached log file.
2) Then the script moves to the next instance or input file and does the above said steps....
I would like to know if, A loads successfully, then it moves over to B, and B loads successfully,, then it moves to C. If C has any issues or file not found, it should stop there........
So with the information given, scottn has replied... (execute A without errrors(&&) B etc...).
If you were expecting more help, its more up to you to give us more to look at...
For instance we have no idea how you wrote your script, so you cant expect us to make your program better...
At simple top down analysis of how the script should work, I can imagine a loop that would process while no errors, meaning also you have test for exit conditions.
For the benefit of those who have not been following msrahman's threads about combining 5 existing scripts into one script whilst adding enhancements such as reporting by email.
The O/P uses bash under Solaris 10 (I think).