I am getting coredump error, when I try to execute Oracle SQLLoader from Shell script in Unix environment. But SQLLoader from local machine runs fine with same database.
SQL*Loader: Release 9.2.0.6.0 - Production on Mon Apr 23 05:23:47 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
If you are moving the script from Windows to Unix and trying it out, it could be a issue with special character - '^M' at the end of each line. Try ftp'ing the file as ascii and make sure there are no special characters at the end of each line(search forums for help on this). Also, if you could post a snapshot of the script that you are using, it would help.
Here you are taking return code of the logfile name assignment that you do. So, it should always return 0. Move the logfile assignment to the top and have the return code check immediately after the sql*loader call.